Skip to content

Commit 77d4a5c

Browse files
Ryan Whitmorebrandonwillard
authored andcommitted
Update the MANIFEST file to exclude unneeded files from sdist, and
update the pypi github actions file to include both wheel and sdist builds.
1 parent 7714e2b commit 77d4a5c

File tree

2 files changed

+46
-8
lines changed

2 files changed

+46
-8
lines changed

.github/workflows/pypi.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,37 @@ concurrency:
1818

1919
jobs:
2020
build:
21-
name: Build source distribution
21+
name: Build distributions
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 0
27-
- uses: actions/setup-python@v2
27+
- uses: actions/setup-python@v4
2828
with:
2929
python-version: "3.9"
30-
- name: Build the sdist
30+
- name: Install build dependencies
3131
run: |
32-
python setup.py sdist
32+
python -m pip install --upgrade pip
33+
python -m pip install build
34+
- name: Build distributions
35+
run: |
36+
python -m build
3337
- name: Check the sdist installs and imports
3438
run: |
3539
mkdir -p test-sdist
3640
cd test-sdist
3741
python -m venv venv-sdist
3842
venv-sdist/bin/python -m pip install ../dist/etuples-*.tar.gz
39-
- uses: actions/upload-artifact@v2
43+
venv-sdist/bin/python -c "import etuples; print(etuples.__version__)"
44+
- name: Check the wheel installs and imports
45+
run: |
46+
mkdir -p test-wheel
47+
cd test-wheel
48+
python -m venv venv-wheel
49+
venv-wheel/bin/python -m pip install ../dist/etuples-*.whl
50+
venv-wheel/bin/python -c "import etuples; print(etuples.__version__)"
51+
- uses: actions/upload-artifact@v4
4052
with:
4153
name: artifact
4254
path: dist/*
@@ -47,11 +59,11 @@ jobs:
4759
runs-on: ubuntu-latest
4860
if: github.event_name == 'release' && github.event.action == 'published'
4961
steps:
50-
- uses: actions/download-artifact@v4.1.7
62+
- uses: actions/download-artifact@v4
5163
with:
5264
name: artifact
5365
path: dist
54-
- uses: pypa/gh-action-pypi-publish@master
66+
- uses: pypa/gh-action-pypi-publish@release/v1
5567
with:
5668
user: __token__
5769
password: ${{ secrets.pypi_secret }}

MANIFEST.in

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Exclude entire directories
2+
prune .github
3+
prune .pytest_cache
4+
prune .tox
5+
prune .nox
6+
prune build
7+
prune dist
8+
prune .ropeproject
9+
prune .vscode
10+
prune .idea
11+
prune .venv
12+
prune venv
13+
prune env
14+
15+
# Exclude file patterns
16+
global-exclude .DS_Store
17+
global-exclude __pycache__
18+
global-exclude *.py[cod]
19+
global-exclude *.so
20+
global-exclude .git*
21+
global-exclude .coverage
22+
global-exclude *.egg-info
23+
global-exclude *.swp
24+
global-exclude *.swo
25+
global-exclude *~
26+
global-exclude .env

0 commit comments

Comments
 (0)