Skip to content

Commit 04ba1c7

Browse files
committed
Ensure supporting files are included in source distribution
These supporting files should be included in the source distribution shipped to PyPI. Most critically, the LICENSE ought to be shipped with the source. Also removes the code in setup.py tolerating absence of README.md. The reason it was missing for older python/setuptools was that README.md isn't implicitly included in the source dist for those old versions.
1 parent 980a2ba commit 04ba1c7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Diff for: CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10-
- n/a
10+
### Fixed
11+
12+
- Added missing files (changelog, license) to PyPI distribution
1113

1214
## 1.0.0 - 2019-02-07
1315

Diff for: MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include README.md
2+
include CHANGELOG.md
3+
include LICENSE

Diff for: setup.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,8 @@ def get_description():
66

77

88
def get_long_description():
9-
try:
10-
text = open('README.md').read()
11-
except IOError as error:
12-
if error.errno == 2:
13-
# fallback for older setuptools
14-
return get_description()
15-
raise
9+
with open('README.md') as f:
10+
text = f.read()
1611

1712
# Long description is everything after README's initial heading
1813
idx = text.find('\n\n')

0 commit comments

Comments
 (0)