Skip to content

Commit 07c4b57

Browse files
committed
Changes for deployment
1 parent bd08632 commit 07c4b57

File tree

4 files changed

+29
-2
lines changed

4 files changed

+29
-2
lines changed

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ include requirements.txt test_requirements.txt
55
exclude .gitignore
66
exclude *.pyc
77
recursive-exclude winevtrc *.pyc
8-
recursive-include test_data *
8+
# Do not include the test data otherwise the sdist will be too large for PyPi.
9+
recursive-exclude test_data *
910
# The test scripts are not required in a binary distribution package they
1011
# are considered source distribution files and excluded in find_package()
1112
# in setup.py.

MANIFEST.test_data.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
include ACKNOWLEDGEMENTS AUTHORS LICENSE README
2+
include dependencies.ini run_tests.py utils/dependencies.py
3+
include utils/check_dependencies.py
4+
include requirements.txt test_requirements.txt
5+
exclude .gitignore
6+
exclude *.pyc
7+
recursive-exclude winevtrc *.pyc
8+
recursive-include test_data *
9+
# The test scripts are not required in a binary distribution package they
10+
# are considered source distribution files and excluded in find_package()
11+
# in setup.py.
12+
recursive-include tests *.py

setup.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
[metadata]
22
license_file = LICENSE
33

4+
[sdist]
5+
template = MANIFEST.in
6+
manifest = MANIFEST
7+
8+
[sdist_test_data]
9+
template = MANIFEST.test_data.in
10+
manifest = MANIFEST.test_data
11+
412
[bdist_rpm]
513
release = 1
614
packager = Joachim Metz <joachim.metz@gmail.com>

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
except ImportError:
2323
bdist_rpm = None
2424

25+
try:
26+
from setuptools.commands.sdist import sdist
27+
except ImportError:
28+
from distutils.command.sdist import sdist
29+
2530
version_tuple = (sys.version_info[0], sys.version_info[1])
2631
if version_tuple < (3, 6):
2732
print((
@@ -196,7 +201,8 @@ def parse_requirements_from_file(path):
196201
maintainer_email='joachim.metz@gmail.com',
197202
cmdclass={
198203
'bdist_msi': BdistMSICommand,
199-
'bdist_rpm': BdistRPMCommand},
204+
'bdist_rpm': BdistRPMCommand,
205+
'sdist_test_data': sdist},
200206
classifiers=[
201207
'',
202208
'Environment :: Console',

0 commit comments

Comments
 (0)