Skip to content

Commit 2451b23

Browse files
author
Vikas Kumar
committed
Include data files in source distribution tarball
1. Added `MANIFEST.in` file and included data files to it. In absence of `MANIFEST.in` data files are not included in source tarball. This makes pip to fail when installing from source tarball. 2. Removed `MANIFEST.in` creation from `Makefile`
1 parent d9c10e1 commit 2451b23

3 files changed

Lines changed: 11 additions & 21 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
MANIFEST
2-
MANIFEST.in
32
TAGS
43
build
54
dist
65
*.rnc
76
schemas.xml
87
*.pyc
8+
*.egg-info
99
.coverage*
1010
/test/test_*/*.dsrl
1111
/test/test_*/*.rng

MANIFEST.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
include etc/bash_completion.d/pyang
2+
recursive-include modules *
3+
recursive-include xslt *
4+
recursive-include schema *
5+
recursive-include tools/images *
6+
recursive-include man *
7+
include LICENSE
8+
include env.sh

Makefile

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
# create a full source package
2-
sdist: MANIFEST doc
3-
rm -f MANIFEST.in
2+
sdist: doc
43
python setup.py sdist
54
-# mv dist/pyang-*.tar.gz dist/pyang_src-*.tar.gz
65

76
# create a minimal package
87
dist: doc
9-
rm -f MANIFEST
10-
echo "include LICENSE" > MANIFEST.in
11-
echo "include env.sh" >> MANIFEST.in
12-
echo "recursive-include man *" >> MANIFEST.in
13-
echo "recursive-include schema *" >> MANIFEST.in
14-
echo "recursive-include xslt *" >> MANIFEST.in
15-
echo "recursive-include modules *" >> MANIFEST.in
16-
echo "recursive-include tools/images *" >> MANIFEST.in
178
python setup.py sdist
189

1910
.PHONY: test tags clean doc
@@ -27,17 +18,8 @@ clean:
2718
(cd test && $(MAKE) clean)
2819
(cd doc && $(MAKE) clean)
2920
python setup.py clean --all
30-
rm -rf build dist MANIFEST*
21+
rm -rf build dist MANIFEST
3122
find . -name "*.pyc" -exec rm {} \;
3223

33-
MANIFEST:
34-
@if [ -d .svn ] ; then \
35-
svn list -R | grep -v ".gitignore" > $@; \
36-
elif [ -d .git ] ; then \
37-
git ls-files > $@; \
38-
else \
39-
echo "MANIFEST can only be generated from SVN or git."; \
40-
fi
41-
4224
tags:
4325
find . -name "*.py" | etags -

0 commit comments

Comments
 (0)