Skip to content

Commit b3a6ce3

Browse files
committed
ci: ensure compatibility with Python 2.7;
docs: update setup.py,README.md
1 parent 18ab264 commit b3a6ce3

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
include:
1818
# first test on vanilla environments
1919
- name: py2.7
20-
os: ubuntu-20.04
20+
os: ubuntu-22.04
2121
python-version: 2.7
2222
- name: py3.7
2323
os: ubuntu-22.04
@@ -46,7 +46,7 @@ jobs:
4646
python-version: 2.6
4747
# then test with the different optional dependencies installed
4848
- name: py2.7 with m2crypto
49-
os: ubuntu-20.04
49+
os: ubuntu-22.04
5050
python-version: 2.7
5151
opt-deps: ['m2crypto']
5252
- name: py3.7 with m2crypto
@@ -70,7 +70,7 @@ jobs:
7070
python-version: '3.11'
7171
opt-deps: ['m2crypto']
7272
- name: py2.7 with pycrypto
73-
os: ubuntu-20.04
73+
os: ubuntu-22.04
7474
python-version: 2.7
7575
opt-deps: ['pycrypto']
7676
- name: py3.10 with pycryptodome
@@ -80,7 +80,7 @@ jobs:
8080
# it doesn't break pycrypto code
8181
opt-deps: ['pycryptodome']
8282
- name: py2.7 with gmpy
83-
os: ubuntu-20.04
83+
os: ubuntu-22.04
8484
python-version: 2.7
8585
opt-deps: ['gmpy']
8686
- name: py3.7 with gmpy
@@ -101,7 +101,7 @@ jobs:
101101
python-version: '3.10'
102102
opt-deps: ['gmpy']
103103
- name: py2.7 with gmpy2
104-
os: ubuntu-20.04
104+
os: ubuntu-22.04
105105
python-version: 2.7
106106
opt-deps: ['gmpy2']
107107
- name: py3.7 with gmpy2
@@ -133,7 +133,7 @@ jobs:
133133
python-version: '3.13'
134134
opt-deps: ['gmpy2']
135135
- name: py2.7 with brotli
136-
os: ubuntu-20.04
136+
os: ubuntu-22.04
137137
python-version: 2.7
138138
# zstandard is available for py3.8 and above
139139
opt-deps: ['brotli']
@@ -188,7 +188,7 @@ jobs:
188188
opt-deps: ["kyber_py"]
189189
# finally test with multiple dependencies installed at the same time
190190
- name: py2.7 with m2crypto, pycrypto, gmpy, gmpy2, and brotli
191-
os: ubuntu-20.04
191+
os: ubuntu-22.04
192192
python-version: 2.7
193193
opt-deps: ['m2crypto', 'pycrypto', 'gmpy', 'gmpy2', 'brotli']
194194
- name: py3.7 with m2crypto, gmpy, gmpy2, and brotli
@@ -275,15 +275,17 @@ jobs:
275275
uses: actions/setup-python@v2
276276
with:
277277
python-version: ${{ matrix.python-version }}
278-
- name: Ensure python 2.7
278+
- name: Ensure working pip on python 2.7
279279
if: matrix.python-version == '2.7'
280280
run: |
281281
sudo apt-get update
282+
sudo add-apt-repository universe
282283
sudo apt-get install -y \
283-
python2.7 python2.7-dev python-pip-whl
284+
python2.7 python2.7-dev
285+
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
284286
sudo ln -sf python2.7 /usr/bin/python
285-
export PYTHONPATH=`echo /usr/share/python-wheels/pip-*py2*.whl`
286-
sudo --preserve-env=PYTHONPATH python -m pip install --upgrade pip setuptools wheel
287+
sudo python get-pip.py
288+
sudo pip install setuptools wheel
287289
sudo chown -R $USER /usr/local/lib/python2.7
288290
- name: Display Python version
289291
run: python -c "import sys; print(sys.version)"
@@ -312,7 +314,7 @@ jobs:
312314
pip install setuptools-28.8.0-py2.py3-none-any.whl wheel-0.30.0a0-py2.py3-none-any.whl
313315
- name: Install M2Crypto for python 2.7
314316
if: ${{ contains(matrix.opt-deps, 'm2crypto') && matrix.python-version == '2.7' }}
315-
run: pip install M2Crypto==0.37.1
317+
run: pip install M2Crypto==0.38.0
316318
- name: Install M2Crypto for python
317319
if: ${{ contains(matrix.opt-deps, 'm2crypto') && matrix.python-version != '2.7' }}
318320
run: pip install --pre M2Crypto
@@ -445,7 +447,7 @@ jobs:
445447
PYTHON_VERSION: ${{ matrix.python-version }}
446448
run: |
447449
opt=""
448-
if ! [[ $PYTHON_VERSION == 2.6 || $PYTHON_VERSION == 2.7 || $PYTHON_VERSION == 3.3 || $PYTHON_VERSION == 3.4 || $PYTHON_VERSION == 3.5 ||| $PYTHON_VERSION == 3.6]]; then
450+
if ! [[ $PYTHON_VERSION == 2.6 || $PYTHON_VERSION == 2.7 || $PYTHON_VERSION == 3.3 || $PYTHON_VERSION == 3.4 || $PYTHON_VERSION == 3.5 ]]; then
449451
opt="--compare-branch origin/master"
450452
fi
451453
pylint --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" tlslite > pylint_report.txt || :

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Currently it is distributed under Gnu LGPLv2 license.
9595
Requirements:
9696

9797
* Python 2.6 or higher is required.
98-
* Python 3.6 or higher is supported.
98+
* Python 3.7 or higher is supported.
9999
* python ecdsa >= 0.13.3 library
100100
([GitHub](https://github.com/warner/python-ecdsa),
101101
[PyPI](https://pypi.python.org/pypi/ecdsa))

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
'package1': ['LICENSE', 'README.md']},
2525
install_requires=['ecdsa>=0.18.0b1'],
2626
obsoletes=["tlslite"],
27-
python_requires=">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*",
27+
python_requires=">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*",
2828
classifiers=[
2929
'Development Status :: 5 - Production/Stable',
3030
'Intended Audience :: Developers',
@@ -35,7 +35,6 @@
3535
'Programming Language :: Python :: 2.6',
3636
'Programming Language :: Python :: 2.7',
3737
'Programming Language :: Python :: 3',
38-
'Programming Language :: Python :: 3.6',
3938
'Programming Language :: Python :: 3.7',
4039
'Programming Language :: Python :: 3.8',
4140
'Programming Language :: Python :: 3.9',

0 commit comments

Comments
 (0)