Skip to content

Commit bc71541

Browse files
committed
Add MANIFEST.in back since pyproject.toml + setuptools is still lacking exclude
functionality.
1 parent 4ede98f commit bc71541

File tree

3 files changed

+53
-30
lines changed

3 files changed

+53
-30
lines changed

CHANGES.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ Common
99

1010
- Unused ``setup.py`` file has been removed. The project has switched
1111
to ``pyproject.toml`` a while ago and unused file has been removed to
12-
reduce potential confusion. Corresponding ``MANIFEST.in`` has also been
13-
removed in favor of explicit include and exclude directives in
14-
``pyproject.toml``.
12+
reduce potential confusion.
1513
(#2024)
1614
[Tomaz Muraus - @Kami]
1715

MANIFEST.in

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# NOTE: We still need to use MANIFEST.in for backward compatibility with past
2+
# distributions since pyproject.toml + setuptools backend doesn't support
3+
# as flexible includes and excludes as we need.
4+
global-exclude *.py[cod]
5+
global-exclude .pytest_cache
6+
7+
# Include common files at the repository root
8+
include LICENSE
9+
include NOTICE
10+
include example_*.py
11+
include CHANGES.rst
12+
include README.rst
13+
include tox.ini
14+
include pyproject.toml
15+
include requirements-tests.txt
16+
include requirements-lint.txt
17+
include libcloud/data/pricing.json
18+
include libcloud/test/secrets.py-dist
19+
include demos/*
20+
include scripts/check_file_names.sh
21+
recursive-exclude libcloud/test secrets.py
22+
prune libcloud/test/secrets.py
23+
prune requirements-rtd.txt
24+
prune dist
25+
prune build
26+
prune contrib/
27+
prune docs/
28+
prune demos/
29+
prune integration/
30+
prune pylint_plugins/
31+
prune __pycache__
32+
33+
# Recursively include all files under the fixture directories
34+
recursive-include libcloud/test/backup/fixtures *
35+
recursive-include libcloud/test/common/fixtures *
36+
recursive-include libcloud/test/compute/fixtures *
37+
recursive-include libcloud/test/container/fixtures *
38+
recursive-include libcloud/test/dns/fixtures *
39+
recursive-include libcloud/test/loadbalancer/fixtures *
40+
recursive-include libcloud/test/storage/fixtures *
41+
42+
# Exclude __pycache__ directories
43+
prune **/__pycache__

pyproject.toml

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -93,34 +93,16 @@ include = ["libcloud", "libcloud.test*", "libcloud.*" ]
9393
"pricing.json"
9494
]
9595
"libcloud.test" = [
96-
"*.json",
97-
"*.xml",
98-
"*.pub",
99-
"*.key",
100-
"*.pem",
101-
"*.crt",
102-
"*.csv",
103-
"*.txt",
104-
"*.html",
105-
"secrets.py-dist",
96+
"**/*.json",
97+
"**/*.xml",
98+
"**/*.pub",
99+
"**/*.key",
100+
"**/*.pem",
101+
"**/*.crt",
102+
"**/*.csv",
103+
"**/*.txt",
104+
"**/*.html",
106105
]
107-
"libcloud.test.compute.fixtures.misc" = ["*"]
108-
"libcloud.test.dns.fixtures.worldwidedns" = ["*"]
109-
110-
# Files outside of packages (in the repository root, demos directory, etc.)
111-
[tool.setuptools.data-files]
112-
"" = [
113-
"LICENSE",
114-
"NOTICE",
115-
"CHANGES.rst",
116-
"README.rst",
117-
"tox.ini",
118-
"pyproject.toml",
119-
"requirements-tests.txt",
120-
"requirements-lint.txt",
121-
]
122-
"demos" = ["demos/*"]
123-
124106

125107
[tool.setuptools]
126108
include-package-data = true

0 commit comments

Comments
 (0)