Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
127cfdfb
Commit
127cfdfb
authored
May 14, 2020
by
alvyjudy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: udpate package_discovery.txt
parent
6c6568db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
docs/userguide/package_discovery.txt
docs/userguide/package_discovery.txt
+17
-5
No files found.
docs/userguide/package_discovery.txt
View file @
127cfdfb
...
...
@@ -2,15 +2,27 @@
Package Discovery
===================
``Setuptools`` provide powerful tools to handle package discovery, including
support for namespace package. The following explain how you include package
in your ``setup`` script::
setup(
packages = ['mypkg1', 'mypkg2']
)
To speed things up, we introduce two functions provided by setuptools::
from setuptools import find_packages
or::
from setuptools import find_namespace_packages
Using ``find_packages()``
-------------------------
For simple projects, it's usually easy enough to manually add packages to
the ``packages`` argument of ``setup()``. However, for very large projects
(Twisted, PEAK, Zope, Chandler, etc.), it can be a big burden to keep the
package list updated. That's what ``setuptools.find_packages()`` is for.
Let's start with the first tool.
``find_packages()`` takes a source directory and two lists of package name
patterns to exclude and include. If omitted, the source directory defaults to
...
...
@@ -166,4 +178,4 @@ You must include the ``declare_namespace()`` line in the ``__init__.py`` of
order to ensure that the namespace will be declared regardless of which
project's copy of ``__init__.py`` is loaded first. If the first loaded
``__init__.py`` doesn't declare it, it will never *be* declared, because no
other copies will ever be loaded!
\ No newline at end of file
other copies will ever be loaded!
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment