mirror of
https://github.com/torproject/stem.git
synced 2025-02-17 08:27:30 +00:00
Merge MANIFEST.in into setup.py
The manifest solely exists to make our source distribution contain the files it should. Silly we can't simply specify them in our setup() call, but oh well. Lets include this in our setup.py to avoid clutter and keep this where it should be.
This commit is contained in:
parent
484b00544f
commit
4581199ffd
17
MANIFEST.in
17
MANIFEST.in
@ -1,17 +0,0 @@
|
||||
include cache_fallback_directories.py
|
||||
include cache_manual.py
|
||||
include LICENSE
|
||||
include MANIFEST.in
|
||||
include requirements.txt
|
||||
include run_tests.py
|
||||
include tox.ini
|
||||
graft docs
|
||||
graft test
|
||||
global-exclude __pycache__
|
||||
global-exclude *.orig
|
||||
global-exclude *.pyc
|
||||
global-exclude *.swp
|
||||
global-exclude *.swo
|
||||
global-exclude .tox
|
||||
recursive-exclude test/data *
|
||||
recursive-exclude docs/_build *
|
83
setup.py
83
setup.py
@ -31,37 +31,64 @@ To install you can either use...
|
||||
After that, give some `tutorials <https://stem.torproject.org/tutorials.html>`_ a try! For questions or to discuss project ideas we're available on `irc <https://www.torproject.org/about/contact.html.en#irc>`_ and the `tor-dev@ email list <https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev>`_.
|
||||
""".strip()
|
||||
|
||||
MANIFEST = """
|
||||
include cache_fallback_directories.py
|
||||
include cache_manual.py
|
||||
include LICENSE
|
||||
include MANIFEST.in
|
||||
include requirements.txt
|
||||
include run_tests.py
|
||||
include tox.ini
|
||||
graft docs
|
||||
graft test
|
||||
global-exclude __pycache__
|
||||
global-exclude *.orig
|
||||
global-exclude *.pyc
|
||||
global-exclude *.swp
|
||||
global-exclude *.swo
|
||||
global-exclude .tox
|
||||
recursive-exclude test/data *
|
||||
recursive-exclude docs/_build *
|
||||
""".strip()
|
||||
|
||||
# Ensure this is our cwd, otherwise distutils fails with 'standard file
|
||||
# 'setup.py' not found'.
|
||||
|
||||
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
distutils.core.setup(
|
||||
name = 'stem-dry-run' if DRY_RUN else 'stem',
|
||||
version = stem.__version__,
|
||||
description = DRY_RUN_SUMMARY if DRY_RUN else SUMMARY,
|
||||
long_description = DESCRIPTION,
|
||||
license = stem.__license__,
|
||||
author = stem.__author__,
|
||||
author_email = stem.__contact__,
|
||||
url = stem.__url__,
|
||||
packages = ['stem', 'stem.descriptor', 'stem.interpreter', 'stem.response', 'stem.util'],
|
||||
keywords = 'tor onion controller',
|
||||
scripts = ['tor-prompt'],
|
||||
provides = ['stem'],
|
||||
package_data = {
|
||||
'stem': ['cached_tor_manual.cfg', 'settings.cfg'],
|
||||
'stem.descriptor': ['fallback_directories.cfg'],
|
||||
'stem.interpreter': ['settings.cfg'],
|
||||
'stem.util': ['ports.cfg'],
|
||||
}, classifiers = [
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
|
||||
'Topic :: Security',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||
],
|
||||
)
|
||||
with open('MANIFEST.in', 'w') as manifest_file:
|
||||
manifest_file.write(MANIFEST)
|
||||
|
||||
if os.path.exists('MANIFEST'):
|
||||
os.remove('MANIFEST')
|
||||
try:
|
||||
distutils.core.setup(
|
||||
name = 'stem-dry-run' if DRY_RUN else 'stem',
|
||||
version = stem.__version__,
|
||||
description = DRY_RUN_SUMMARY if DRY_RUN else SUMMARY,
|
||||
long_description = DESCRIPTION,
|
||||
license = stem.__license__,
|
||||
author = stem.__author__,
|
||||
author_email = stem.__contact__,
|
||||
url = stem.__url__,
|
||||
packages = ['stem', 'stem.descriptor', 'stem.interpreter', 'stem.response', 'stem.util'],
|
||||
keywords = 'tor onion controller',
|
||||
scripts = ['tor-prompt'],
|
||||
provides = ['stem'],
|
||||
package_data = {
|
||||
'stem': ['cached_tor_manual.cfg', 'settings.cfg'],
|
||||
'stem.descriptor': ['fallback_directories.cfg'],
|
||||
'stem.interpreter': ['settings.cfg'],
|
||||
'stem.util': ['ports.cfg'],
|
||||
}, classifiers = [
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
|
||||
'Topic :: Security',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||
],
|
||||
)
|
||||
finally:
|
||||
if os.path.exists('MANIFEST.in'):
|
||||
os.remove('MANIFEST.in')
|
||||
|
||||
if os.path.exists('MANIFEST'):
|
||||
os.remove('MANIFEST')
|
||||
|
Loading…
x
Reference in New Issue
Block a user