Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit68a97ce

Browse files
nejchJohnVillalovos
authored andcommitted
fix(build): do not include docs in wheel package
1 parent5ce3b17 commit68a97ce

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

‎setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def get_version():
2424
author_email="gauvain@pocentek.net",
2525
license="LGPLv3",
2626
url="https://github.com/python-gitlab/python-gitlab",
27-
packages=find_packages(exclude=["tests*"]),
27+
packages=find_packages(exclude=["docs*","tests*"]),
2828
install_requires=["requests>=2.25.0","requests-toolbelt>=0.9.1"],
2929
package_data={
3030
"gitlab": ["py.typed"],

‎tests/smoke/test_dists.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
fromgitlabimport__title__,__version__
1010

1111
DIST_DIR=Path("dist")
12+
DOCS_DIR="docs"
1213
TEST_DIR="tests"
1314
SDIST_FILE=f"{__title__}-{__version__}.tar.gz"
1415
WHEEL_FILE= (
@@ -18,8 +19,8 @@
1819

1920
@pytest.fixture(scope="function")
2021
defbuild():
21-
sandbox.run_setup("setup.py", ["clean","--all"])
22-
returnsandbox.run_setup("setup.py", ["sdist","bdist_wheel"])
22+
sandbox.run_setup("setup.py", ["--quiet","clean","--all"])
23+
returnsandbox.run_setup("setup.py", ["--quiet","sdist","bdist_wheel"])
2324

2425

2526
deftest_sdist_includes_tests(build):
@@ -28,6 +29,6 @@ def test_sdist_includes_tests(build):
2829
asserttest_dir.isdir()
2930

3031

31-
deftest_wheel_excludes_tests(build):
32+
deftest_wheel_excludes_docs_and_tests(build):
3233
wheel=zipfile.ZipFile(DIST_DIR/WHEEL_FILE)
33-
assert[notfile.startswith(TEST_DIR)forfileinwheel.namelist()]
34+
assertnotany([file.startswith((DOCS_DIR,TEST_DIR))forfileinwheel.namelist()])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp