Skip to content

Commit 8941fef

Browse files
authored
Adding requirements.txt into MANIFEST.in (#520)
* Adding requirements.txt into MANIFEST.in * Updating coverage.yml * Fixing python version for Integration Coverage * Updating macos in ci.yml * Updating Workflows to deprecate all version of pythons & macos * Updating Workflows to deprecate all version of pythons & macos: ci.yml * Updating Workflows to deprecate all version of pythons & macos: ci.yml * Updating Workflows to deprecate all version of pythons & macos: ci.yml - new try * ci.yml going back to ubuntu 20.04 for 3.7 * ci.yml going back to ubuntu 20.04 for Docs * Reverting setup-python * Changing actions to Ubuntu 22.04 as 20.04 is deprecated * Removing python2.7 * Changing actions versions * Changing actions versions * Changing actions versions * Changing actions versions * Changing actions versions * Changing actions versions * Changing actions versions * Changing actions versions
1 parent e497010 commit 8941fef

File tree

6 files changed

+118
-83
lines changed

6 files changed

+118
-83
lines changed

.github/workflows/ci.yml

Lines changed: 97 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -6,104 +6,127 @@ jobs:
66
CI:
77
continue-on-error: true
88
runs-on: ${{ matrix.os }}
9-
# Supported Versions:
10-
# https://github.com/actions/python-versions/blob/main/versions-manifest.json
9+
1110
strategy:
11+
fail-fast: false
1212
matrix:
13-
os: [macos-13, windows-latest]
14-
python-version: [3.6, 3.7, 3.8, pypy-3.7]
15-
exclude:
16-
- os: windows-latest
17-
python-version: 3.6
18-
include:
19-
- os: ubuntu-20.04
20-
python-version: 3.7
21-
- os: ubuntu-20.04
22-
python-version: 2.7
13+
os: [macos-15-intel, macos-latest, windows-latest, ubuntu-latest]
14+
python-version: ["3.9", "3.10", "3.11"]
15+
2316
steps:
24-
- uses: actions/checkout@v2
25-
- if: ${{ matrix.python-version == '2.7' }}
26-
name: Setup Python environment (2.7)
27-
run: |
28-
sudo apt-get install python-is-python2
29-
curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
30-
python get-pip.py
31-
- if: ${{ matrix.python-version != '2.7' }}
32-
name: Setup Python environment
33-
uses: actions/[email protected]
17+
- uses: actions/checkout@v5
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v6
3421
with:
3522
python-version: ${{ matrix.python-version }}
36-
- name: Install Requirements
23+
cache: "pip"
24+
25+
- name: Install dependencies
3726
run: |
38-
python -m pip install --upgrade pip
39-
pip install flake8 pytest
40-
pip install -r requirements.txt
41-
pip install -r test/requirements.txt
42-
python setup.py install --user
43-
- name: Run Linter
27+
python -m pip install -U pip
28+
python -m pip install -U build flake8 pytest
29+
python -m pip install -r requirements.txt
30+
python -m pip install -r test/requirements.txt
31+
32+
- name: Build wheel
33+
run: python -m build --wheel
34+
35+
- name: Show dist contents
36+
run: ls -la dist
37+
shell: bash
38+
39+
- name: Install package from wheel (robust)
40+
shell: bash
41+
run: |
42+
WHEEL="$(python -c "import glob; w=glob.glob('dist/*.whl'); print(w[0] if w else '')")"
43+
if [ -z "$WHEEL" ]; then
44+
echo "No wheel was built. dist contains:"
45+
ls -la dist || true
46+
exit 1
47+
fi
48+
python -m pip install "$WHEEL"
49+
50+
- name: Run linter
4451
run: |
4552
flake8 setup.py dropbox example test
46-
- name: Run Unit Tests
53+
54+
- name: Run unit tests
4755
run: |
4856
pytest -v test/unit/test_dropbox_unit.py
4957
Docs:
50-
runs-on: ubuntu-20.04
58+
runs-on: ubuntu-latest
5159
steps:
52-
- uses: actions/checkout@v2
53-
- name: Setup Python environment
54-
uses: actions/[email protected]
60+
- uses: actions/checkout@v5
61+
62+
- name: Set up Python
63+
uses: actions/setup-python@v6
5564
with:
56-
python-version: '3.7'
57-
- name: Install Requirements
65+
python-version: "3.9"
66+
cache: "pip"
67+
68+
- name: Install build and doc tooling
5869
run: |
59-
python -m pip install --upgrade pip
60-
pip install twine sphinx
61-
pip install -r requirements.txt
62-
pip install -r test/requirements.txt
63-
python setup.py install
64-
- name: Test Doc Generation
70+
python -m pip install -U pip
71+
python -m pip install build twine sphinx
72+
python -m pip install -r requirements.txt
73+
python -m pip install -r test/requirements.txt
74+
75+
- name: Build sdist and wheel (PEP 517)
76+
run: python -m build
77+
78+
- name: Validate distribution metadata
79+
run: twine check dist/*
80+
81+
- name: Build wheel
82+
run: python -m build --wheel
83+
84+
- name: Install package from wheel
6585
run: |
66-
sphinx-build -b html docs build/html
67-
- name: Test Dist Generation
86+
python -c "import glob,sys; w=glob.glob('dist/*.whl'); assert w, f'No wheel built. dist contains: {glob.glob(\"dist/*\")}'; print(w[0])"
87+
python -c "import glob; print(glob.glob('dist/*.whl')[0])" > wheel_path.txt
88+
python -m pip install "$(cat wheel_path.txt)"
89+
shell: bash
90+
91+
92+
- name: Test documentation generation
6893
run: |
69-
python setup.py sdist bdist_wheel
70-
twine check dist/*
94+
sphinx-build -b html docs build/html
95+
7196
Integration:
7297
continue-on-error: true
7398
runs-on: ${{ matrix.os }}
7499
strategy:
100+
fail-fast: false
75101
matrix:
76-
os: [macos-13, windows-latest]
77-
python-version: [3.6, 3.7, 3.8, pypy-3.7]
78-
exclude:
79-
- os: windows-latest
80-
python-version: 3.6
81-
include:
82-
- os: ubuntu-20.04
83-
python-version: 3.7
84-
- os: ubuntu-20.04
85-
python-version: 2.7
102+
os: [macos-15-intel, macos-latest, windows-latest, ubuntu-latest]
103+
python-version: ["3.9", "3.10", "3.11"]
104+
86105
steps:
87-
- uses: actions/[email protected]
88-
- if: ${{ matrix.python-version == '2.7' }}
89-
name: Setup Python environment (2.7)
90-
run: |
91-
sudo apt-get install python-is-python2
92-
curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
93-
python get-pip.py
94-
- if: ${{ matrix.python-version != '2.7' }}
95-
name: Setup Python environment
96-
uses: actions/[email protected]
106+
- uses: actions/checkout@v5
107+
108+
- name: Set up Python
109+
uses: actions/setup-python@v6
97110
with:
98111
python-version: ${{ matrix.python-version }}
99-
- name: Install Requirements
112+
cache: "pip"
113+
114+
- name: Install dependencies
100115
run: |
101-
python -m pip install --upgrade pip
102-
pip install flake8 pytest
103-
pip install -r requirements.txt
104-
pip install -r test/requirements.txt
105-
python setup.py install --user
106-
- name: Run Integration Tests
116+
python -m pip install -U pip
117+
python -m pip install -U build pytest
118+
python -m pip install -r requirements.txt
119+
python -m pip install -r test/requirements.txt
120+
121+
- name: Build wheel
122+
run: python -m build --wheel
123+
124+
- name: Install package from wheel (cross-platform)
125+
shell: bash
126+
run: |
127+
python -m pip install "$(python -c "import glob,sys; w=glob.glob('dist/*.whl'); assert w, f'No wheel built. dist contains: {glob.glob(\"dist/*\")}'; print(w[0])")"
128+
129+
- name: Run integration tests
107130
env:
108131
LEGACY_USER_DROPBOX_TOKEN: ${{ secrets.LEGACY_USER_DROPBOX_TOKEN }}
109132
LEGACY_USER_CLIENT_ID: ${{ secrets.LEGACY_USER_CLIENT_ID }}
@@ -119,4 +142,4 @@ jobs:
119142
SCOPED_TEAM_REFRESH_TOKEN: ${{ secrets.SCOPED_TEAM_REFRESH_TOKEN }}
120143
DROPBOX_SHARED_LINK: ${{ secrets.DROPBOX_SHARED_LINK }}
121144
run: |
122-
pytest -v test/integration/test_dropbox.py
145+
pytest -v test/integration/test_dropbox.py

.github/workflows/coverage.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@ jobs:
1111
Coverage:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
- name: Setup Python environment
16-
uses: actions/setup-python@v3.1.4
16+
uses: actions/setup-python@v4
1717
with:
18-
python-version: '3.7'
18+
python-version: '3.9'
19+
- name: Setup virtual environment
20+
run: |
21+
python -m venv venv
22+
source venv/bin/activate
23+
python -m pip install --upgrade pip
1924
- name: Install Requirements
2025
run: |
2126
python -m pip install --upgrade pip
@@ -40,7 +45,12 @@ jobs:
4045
- name: Setup Python environment
4146
uses: actions/[email protected]
4247
with:
43-
python-version: '3.7'
48+
python-version: '3.9'
49+
- name: Setup virtual environment
50+
run: |
51+
python -m venv venv
52+
source venv/bin/activate
53+
python -m pip install --upgrade pip
4454
- name: Install Requirements
4555
run: |
4656
python -m pip install --upgrade pip

.github/workflows/pypiupload.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ on:
99

1010
jobs:
1111
deploy:
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: [2.7, 3.7]
15+
python-version: [2.7, 3.x]
1616

1717
steps:
1818
- uses: actions/[email protected]
@@ -24,7 +24,7 @@ jobs:
2424
python get-pip.py
2525
- if: ${{ matrix.python-version != '2.7' }}
2626
name: Setup Python environment
27-
uses: actions/setup-python@v3.1.4
27+
uses: actions/setup-python@vv3.1.4
2828
with:
2929
python-version: ${{ matrix.python-version }}
3030
- name: Install dependencies

.github/workflows/spec_update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jobs:
88
Update:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
- name: Setup Python environment
1313
uses: actions/[email protected]
1414
with:
15-
python-version: 3.7
15+
python-version: 3.9
1616
- name: Get current time
1717
uses: 1466587594/get-current-time@v2
1818
id: current-time

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include ez_setup.py
22
include LICENSE
33
include *.rst
4+
include requirements.txt
45
include test/requirements.txt

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
'Programming Language :: Python :: 3.6',
7777
'Programming Language :: Python :: 3.7',
7878
'Programming Language :: Python :: 3.8',
79+
'Programming Language :: Python :: 3.9',
7980
'Programming Language :: Python :: Implementation :: CPython',
8081
'Programming Language :: Python :: Implementation :: PyPy',
8182
'Topic :: Software Development :: Libraries :: Python Modules',

0 commit comments

Comments
 (0)