• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1================================
2Developer's Guide for Setuptools
3================================
4
5If you want to know more about contributing on Setuptools, this is the place.
6
7
8.. contents:: **Table of Contents**
9
10
11-------------------
12Recommended Reading
13-------------------
14
15Please read `How to write the perfect pull request
16<https://blog.jaraco.com/how-to-write-perfect-pull-request/>`_ for some tips
17on contributing to open source projects. Although the article is not
18authoritative, it was authored by the maintainer of Setuptools, so reflects
19his opinions and will improve the likelihood of acceptance and quality of
20contribution.
21
22------------------
23Project Management
24------------------
25
26Setuptools is maintained primarily in Github at `this home
27<https://github.com/pypa/setuptools>`_. Setuptools is maintained under the
28Python Packaging Authority (PyPA) with several core contributors. All bugs
29for Setuptools are filed and the canonical source is maintained in Github.
30
31User support and discussions are done through the issue tracker (for specific)
32issues, through the distutils-sig mailing list, or on IRC (Freenode) at
33#pypa.
34
35Discussions about development happen on the pypa-dev mailing list or on
36`Gitter <https://gitter.im/pypa/setuptools>`_.
37
38-----------------
39Authoring Tickets
40-----------------
41
42Before authoring any source code, it's often prudent to file a ticket
43describing the motivation behind making changes. First search to see if a
44ticket already exists for your issue. If not, create one. Try to think from
45the perspective of the reader. Explain what behavior you expected, what you
46got instead, and what factors might have contributed to the unexpected
47behavior. In Github, surround a block of code or traceback with the triple
48backtick "\`\`\`" so that it is formatted nicely.
49
50Filing a ticket provides a forum for justification, discussion, and
51clarification. The ticket provides a record of the purpose for the change and
52any hard decisions that were made. It provides a single place for others to
53reference when trying to understand why the software operates the way it does
54or why certain changes were made.
55
56Setuptools makes extensive use of hyperlinks to tickets in the changelog so
57that system integrators and other users can get a quick summary, but then
58jump to the in-depth discussion about any subject referenced.
59
60-----------
61Source Code
62-----------
63
64Grab the code at Github::
65
66    $ git checkout https://github.com/pypa/setuptools
67
68If you want to contribute changes, we recommend you fork the repository on
69Github, commit the changes to your repository, and then make a pull request
70on Github. If you make some changes, don't forget to:
71
72- add a note in CHANGES.rst
73
74Please commit all changes in the 'master' branch against the latest available
75commit or for bug-fixes, against an earlier commit or release in which the
76bug occurred.
77
78If you find yourself working on more than one issue at a time, Setuptools
79generally prefers Git-style branches, so use Mercurial bookmarks or Git
80branches or multiple forks to maintain separate efforts.
81
82The Continuous Integration tests that validate every release are run
83from this repository.
84
85-------
86Testing
87-------
88
89The primary tests are run using tox. To run the tests, first make
90sure you have tox installed, then invoke it::
91
92    $ tox
93
94Under continuous integration, additional tests may be run. See the
95``.travis.yml`` file for full details on the tests run under Travis-CI.
96
97-------------------
98Semantic Versioning
99-------------------
100
101Setuptools follows ``semver``.
102
103.. explain value of reflecting meaning in versions.
104
105----------------------
106Building Documentation
107----------------------
108
109Setuptools relies on the Sphinx system for building documentation.
110To accommodate RTD, docs must be built from the docs/ directory.
111
112To build them, you need to have installed the requirements specified
113in docs/requirements.txt. One way to do this is to use rwt:
114
115    setuptools/docs$ python -m rwt -r requirements.txt -- -m sphinx . html
116