Skip to content

Commit 8763845

Browse files
authored
Merge pull request #45 from CMSgov/jimfuqian/BB2-python-sdk-bump-versions-for-packages-per-dependabot
Remove requirements (no longer used as build & pack) Update setup.py and add pyproject.toml per setuptools best practice
2 parents 8020013 + afff616 commit 8763845

File tree

6 files changed

+56
-218
lines changed

6 files changed

+56
-218
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exclude cms_bluebutton/tests/**

README-sdk-dev.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ It is intended for BB2 team members or others performing SDK development work.
3535
pip install --upgrade pip
3636

3737
# Update tools
38-
python3 -m pip install --upgrade pip setuptools wheel twine
38+
python3 -m pip install --upgrade pip setuptools wheel twine build
3939
```
4040
4141
## Developing the Blue Button 2.0 SDK (for BB2 team SDK developers)
@@ -47,7 +47,7 @@ To install with the tools you need to develop and run tests do the following:
4747
From the repository base directory:
4848
4949
```
50-
pip install -e .[dev]
50+
pip install -e '.[dev]'
5151
```
5252
5353
### Running tests
@@ -88,7 +88,7 @@ To build the cms_bluebutton package do the following:
8888
```
8989
# From repository root directory:
9090
rm -rf build/
91-
python setup.py bdist_wheel
91+
python -m build --wheel
9292
```
9393
9494
The resulting distribution files with be created in the `dist/` directory.

pyproject.toml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "cms-bluebutton-sdk"
7+
authors = [
8+
{name = "CMS Blue Button 2.0 Team", email = "[email protected]"},
9+
]
10+
description = "An SDK used for interacting with the CMS Blue Button 2.0 API"
11+
requires-python = ">=3.9"
12+
readme = "README.md"
13+
dynamic = ["version"]
14+
license = "CC0-1.0"
15+
classifiers=[
16+
"Programming Language :: Python :: 3",
17+
"Operating System :: OS Independent",
18+
"Development Status :: 5 - Production/Stable",
19+
"Intended Audience :: Developers",
20+
"Intended Audience :: Healthcare Industry",
21+
"Topic :: Software Development",
22+
"Topic :: Software Development :: Libraries :: Python Modules",
23+
]
24+
25+
dependencies = [
26+
"requests >= 2.32.3",
27+
"requests-toolbelt >= 0.9.1",
28+
"pyyaml >= 6.0.2",
29+
"idna >= 3.7",
30+
"urllib3 >= 1.26.8",
31+
"certifi == 2025.1.31"
32+
]
33+
34+
[project.optional-dependencies]
35+
dev = [
36+
"pylint >=2.14.0",
37+
"toml >=0.10.2",
38+
"pytest >= 8.3.5",
39+
"packaging >= 24.0",
40+
"flake8 >= 4.0.1",
41+
"coverage >= 6.3.2",
42+
"requests-mock >= 1.12.1",
43+
"pyyaml >= 6.0.2",
44+
]
45+
46+
[tool.setuptools]
47+
py-modules = ["cms_bluebutton"]
48+
49+
[tool.setuptools.packages.find]
50+
include = ["cms_bluebutton"]
51+
exclude = ["cms_bluebutton.tests.*"]

requirements/req.dev.in

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

requirements/req.dev.txt

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

setup.py

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,7 @@
11
import setuptools
22

3-
43
version = {}
54
with open("./cms_bluebutton/version.py") as fp:
65
exec(fp.read(), version)
76

8-
with open("README.md", "r", encoding="utf-8") as fh:
9-
long_description = fh.read()
10-
11-
setuptools.setup(
12-
name="cms-bluebutton-sdk",
13-
version=version['__version__'],
14-
author="CMS Blue Button 2.0 Team",
15-
author_email="[email protected]",
16-
license="CC0 1.0 Universal",
17-
description="An SDK used for interacting with the CMS Blue Button 2.0 API",
18-
long_description=long_description,
19-
long_description_content_type="text/markdown",
20-
url="https://github.com/CMSgov/cms-bb2-python-sdk",
21-
# For classifiers: https://pypi.org/classifiers/
22-
classifiers=[
23-
"Programming Language :: Python :: 3",
24-
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
25-
"Operating System :: OS Independent",
26-
"Development Status :: 5 - Production/Stable",
27-
"Intended Audience :: Developers",
28-
"Intended Audience :: Healthcare Industry",
29-
"Topic :: Software Development",
30-
"Topic :: Software Development :: Libraries :: Python Modules",
31-
],
32-
packages=setuptools.find_packages(),
33-
python_requires=">=3.6",
34-
install_requires=[
35-
"requests >= 2.0",
36-
"requests-toolbelt >= 0.9.1",
37-
"pyyaml >= 5.0",
38-
],
39-
extras_require={
40-
"dev": [
41-
"pytest >= 6.0",
42-
"requests-mock >= 1.9.3",
43-
],
44-
},
45-
)
7+
setuptools.setup(version=version['__version__'])

0 commit comments

Comments
 (0)