Skip to content

Commit e423cb4

Browse files
feat: port pyclient build config to pyproject.toml (#1470)
* feat: port pyclient build config to pyproject.toml * Update src/client/packaging/pypi/pyproject.toml Co-authored-by: george <[email protected]> * Update src/client/packaging/pypi/pyproject.toml Co-authored-by: george <[email protected]> * Update src/client/packaging/pypi/pyproject.toml Co-authored-by: george <[email protected]> * Update src/client/packaging/pypi/pyproject.toml Co-authored-by: george <[email protected]> * Update src/client/packaging/pypi/pyproject.toml Co-authored-by: george <[email protected]> * Update src/client/packaging/pypi/pyproject.toml Co-authored-by: george <[email protected]> * fix: remove setuptools version pin and python >= 3.8 req * fix: omit dev version classifier metadata for pyclient * fix: small formats to pyclient build config * fix: add python 2 support to our classification * fix(client)+doc: update ci and changelog --------- Co-authored-by: george <[email protected]>
1 parent 69835d1 commit e423cb4

File tree

5 files changed

+57
-33
lines changed

5 files changed

+57
-33
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ tag = False
1313

1414
[bumpversion:file:src/client/packaging/npm/package.json]
1515

16-
[bumpversion:file:src/client/packaging/pypi/setup.py]
16+
[bumpversion:file:src/client/packaging/pypi/pyproject.toml]
1717

1818
[bumpversion:file:dev/local/setup.cfg]

.github/workflows/release-helper.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ jobs:
5757
- name: Install build dependencies
5858
run: |
5959
python -m pip install --upgrade pip
60-
pip install wheel twine
60+
pip install build wheel twine
6161
- name: Prepare package
6262
run: |
6363
cp src/client/*.py src/client/packaging/pypi/delphi_epidata/
6464
- name: Create release
6565
working-directory: src/client/packaging/pypi
6666
run: |
67-
python setup.py sdist bdist_wheel
67+
python -m build --sdist --wheel
6868
- uses: actions/upload-artifact@v2
6969
with:
7070
name: delphi_epidata_py
@@ -80,8 +80,8 @@ jobs:
8080
with:
8181
user: __token__
8282
password: ${{ secrets.DELPHI_PYPI_PROD_TOKEN }}
83-
packages_dir: src/client/packaging/pypi/dist/
84-
skip_existing: true
83+
packages-dir: src/client/packaging/pypi/dist/
84+
skip-existing: true
8585
# repository_url: https://test.pypi.org/legacy/
8686

8787
release_js_client:

src/client/packaging/pypi/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable future changes to the `delphi_epidata` python client will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/).
55

6+
## [4.1.24] - 2024-06-06
7+
8+
### Includes
9+
- https://github.com/cmu-delphi/delphi-epidata/pull/1470
10+
11+
### Changed
12+
- Replaced `setup.py` with `pyproject.toml` for package metadata and build configuration.
13+
614
## [4.1.23] - 2024-05-31
715

816
### Includes
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This file was derived from the PyPA Sample Project
2+
# https://github.com/pypa/sampleproject
3+
4+
# Guide (user-friendly):
5+
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
6+
7+
# Specification (technical, formal):
8+
# https://packaging.python.org/en/latest/specifications/pyproject-toml/
9+
10+
11+
# Choosing a build backend:
12+
# https://packaging.python.org/en/latest/tutorials/packaging-projects/#choosing-a-build-backend
13+
[build-system]
14+
# A list of packages that are needed to build your package:
15+
requires = ["setuptools"] # REQUIRED if [build-system] table is used
16+
# The name of the Python object that frontends will use to perform the build:
17+
build-backend = "setuptools.build_meta" # If not defined, then legacy behavior can happen.
18+
19+
[project]
20+
name = "delphi_epidata" # REQUIRED, is the only field that cannot be marked as dynamic.
21+
version = "4.1.23"
22+
description = "A programmatic interface to Delphi's Epidata API."
23+
readme = "README.md"
24+
license = { file = "LICENSE" }
25+
authors = [{ name = "David Farrow", email = "[email protected]" }]
26+
maintainers = [
27+
{ name = "Delphi Support", email = "[email protected]" },
28+
]
29+
# For a list of valid classifiers, see https://pypi.org/classifiers/
30+
classifiers = [
31+
"License :: OSI Approved :: MIT License",
32+
"Programming Language :: Python",
33+
"Programming Language :: Python :: 2",
34+
"Programming Language :: Python :: 3",
35+
"Operating System :: OS Independent",
36+
"Intended Audience :: Science/Research",
37+
"Natural Language :: English",
38+
"Topic :: Scientific/Engineering :: Bio-Informatics",
39+
]
40+
dependencies = ["aiohttp", "delphi-utils", "requests>=2.7.0", "tenacity"]
41+
42+
[project.urls]
43+
"Homepage" = "https://github.com/cmu-delphi/delphi-epidata"
44+
"Changelog" = "https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/packaging/pypi/CHANGELOG.md"

src/client/packaging/pypi/setup.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)