Skip to content

Commit f7729e2

Browse files
authored
fix(build): migrate setup.py to pyproject.toml (#68)
Signed-off-by: Deepak Selvakumar <[email protected]>
1 parent 6b4b16d commit f7729e2

File tree

9 files changed

+127
-126
lines changed

9 files changed

+127
-126
lines changed

.bumpversion.cfg

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

.bumpversion.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[tool.bumpversion]
2+
current_version = "0.25.0"
3+
commit = true
4+
message = "Update version {current_version} -> {new_version}"
5+
6+
[[tool.bumpversion.files]]
7+
filename = "ibm_vpc/version.py"
8+
search = "__version__ = '{current_version}'"
9+
replace = "__version__ = '{new_version}'"
10+
11+
[[tool.bumpversion.files]]
12+
filename = "pyproject.toml"
13+
search = "version = \"{current_version}\""
14+
replace = "version = \"{new_version}\""
15+
16+
[[tool.bumpversion.files]]
17+
filename = "README.md"
18+
search = "{current_version}"
19+
replace = "{new_version}"

.releaserc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[
88
"@semantic-release/exec",
99
{
10-
"prepareCmd": "bump2version --allow-dirty --current-version ${lastRelease.version} --new-version ${nextRelease.version} patch"
10+
"prepareCmd": "bump-my-version bump --allow-dirty --current-version ${lastRelease.version} --new-version ${nextRelease.version} patch"
1111
}
1212
],
1313
[

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ install:
2626
script: tox
2727

2828
before_deploy:
29-
- pip install bump2version
29+
- pip install bump-my-version
3030
- nvm install --lts
3131
- npm install @semantic-release/changelog
3232
- npm install @semantic-release/exec

Makefile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
setup: deps dev_deps install
1+
setup: deps dev-deps install
22

33
deps:
4-
pip install -r requirements.txt
4+
pip install .
55

6-
dev_deps:
7-
pip install -r requirements-dev.txt
6+
dev-deps:
7+
pip install .[dev]
88

99
install:
1010
pip install -e .
@@ -15,6 +15,12 @@ unit-test:
1515
test-int:
1616
pytest -v test/integration --capture=tee-sys
1717

18-
1918
test-examples:
20-
pytest -v examples/test_vpc_v1_examples.py -rs --capture=tee-sys
19+
pytest -v examples/test_vpc_v1_examples.py -rs --capture=tee-sys
20+
21+
lint:
22+
pylint ibm_vpc test examples --exit-zero
23+
black --check ibm_vpc test examples test
24+
25+
lint-fix:
26+
black ibm_vpc test examples

pyproject.toml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
[project]
2+
name = "ibm-vpc"
3+
version = "0.0.1"
4+
authors = [
5+
{ name="IBM", email="[email protected]" }
6+
]
7+
description = "Python client library for IBM Cloud ibm-vpc Services"
8+
readme = "README.md"
9+
requires-python = ">=3.8"
10+
classifiers = [
11+
"Programming Language :: Python",
12+
"Programming Language :: Python :: 3",
13+
"Programming Language :: Python :: 3.8",
14+
"Programming Language :: Python :: 3.9",
15+
"Programming Language :: Python :: 3.10",
16+
"Programming Language :: Python :: 3.11",
17+
"Programming Language :: Python :: 3.12",
18+
"Programming Language :: Python :: 3.13",
19+
"Development Status :: 4 - Beta",
20+
"Environment :: Console",
21+
"Intended Audience :: Developers",
22+
"License :: OSI Approved :: Apache Software License",
23+
"Operating System :: OS Independent",
24+
"Topic :: Software Development :: Libraries",
25+
"Topic :: Software Development :: Libraries :: Python Modules",
26+
"Topic :: Software Development :: Libraries :: Application Frameworks",
27+
]
28+
keywords=["ibm", "cloud", "ibm cloud services", "vpc" ]
29+
dependencies = [
30+
"ibm_cloud_sdk_core>=3.22.0",
31+
"python_dateutil>=2.5.3,<3.0.0",
32+
]
33+
34+
[project.urls]
35+
Repository = "https://github.ibm.com/ibmcloud/vpc-python-sdk"
36+
Documentation = "https://github.ibm.com/ibmcloud/vpc-python-sdk/blob/master/README.md"
37+
Issues = "https://github.ibm.com/ibmcloud/vpc-python-sdk/issues"
38+
Contributing = "https://github.ibm.com/ibmcloud/vpc-python-sdk/blob/master/CONTRIBUTING.md"
39+
License = "https://github.ibm.com/ibmcloud/vpc-python-sdk/blob/master/LICENSE"
40+
41+
[project.optional-dependencies]
42+
dev = [
43+
"coverage>=7.3.2,<8.0.0",
44+
"pylint>=3.0.0,<4.0.0",
45+
"pytest>=7.4.2,<8.0.0",
46+
"pytest-cov>=4.1.0,<5.0.0",
47+
"responses>=0.23.3,<1.0.0",
48+
"black>=24.0.0,<25.0.0",
49+
"pytest-rerunfailures>=12.0",
50+
"tox>=4.12.0,<4.23.2",
51+
]
52+
publish = [
53+
"build",
54+
"twine"
55+
]
56+
57+
[build-system]
58+
requires = ["setuptools>=67.7.2"]
59+
build-backend = "setuptools.build_meta"
60+
61+
[tool.setuptools]
62+
packages = ["ibm_vpc"]
63+
64+
[tool.black]
65+
line-length = 120
66+
skip-string-normalization = true
67+
68+
[tool.tox]
69+
legacy_tox_ini = """
70+
[tox]
71+
envlist = py37-lint, py37, py38, py39
72+
73+
[testenv:py37-lint]
74+
basepython = python3.7
75+
deps = pylint
76+
commands = pylint --rcfile=.pylintrc ibm-vpc test/unit
77+
78+
[testenv]
79+
passenv = TOXENV CI TRAVIS*
80+
commands =
81+
pytest -v test/unit
82+
83+
deps =
84+
pylint
85+
pytest
86+
pytest-cov
87+
responses
88+
pytest-rerunfailures
89+
ibm_cloud_sdk_core
90+
python_dateutil
91+
92+
usedevelop = True
93+
exclude = .venv,.git,.tox,docs
94+
"""

requirements-dev.txt

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

requirements.txt

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

setup.py

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

0 commit comments

Comments
 (0)