Skip to content

Commit 713faeb

Browse files
committed
MANIFEST/setup: Use setup.py & new MANIFEST.in to minimize package size.
Previously setup.py specifically excluded tests from being packaged, but recent testing demonstrated this now included other files, including development tools. Moving to use the `include` option for the source is simpler here, combined with the addition of a MANIFEST.in file. The MANIFEST.in file is used by various tools, and appears more reliable than other methods to achieve this, particularly as we move towards using pyproject.toml. For now, this aims to remove all but the absolute minimum files to run. MANIFEST added to .gitlint to allow presence as an area in commit titles.
1 parent 8e5c035 commit 713faeb

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.gitlint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ line-length=76
3232

3333
[area-formatting]
3434
# This is a ZT custom rule; these are excluded from the lower-case area rule
35-
exclusions=WIP, DEBUG, README, CHANGELOG, LICENSE, FAQ
35+
exclusions=WIP, DEBUG, README, CHANGELOG, LICENSE, FAQ, MANIFEST
3636

3737
[ignore-by-title]
3838
# Ignore all rules for commits of which the title matches below

MANIFEST.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
prune tools
2+
prune tests
3+
prune .github
4+
exclude .git*
5+
exclude makefile
6+
exclude Pipfile
7+
exclude .codecov.yml
8+
exclude .mailmap
9+
# May bring these back, but aiming to reproduce previous minimal sdist first
10+
prune docs
11+
prune docker

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def long_description():
8787
},
8888
python_requires=">=3.7, <3.12",
8989
keywords="",
90-
packages=find_packages(exclude=["tests", "tests.*"]),
90+
packages=find_packages(include=["zulipterminal*"]),
9191
zip_safe=True,
9292
entry_points={
9393
"console_scripts": [

0 commit comments

Comments
 (0)