Skip to content

Commit a9bfee5

Browse files
author
Cecylia Borek
committed
feat: remove deprecated setup commands
1 parent ab51ffc commit a9bfee5

File tree

4 files changed

+42
-38
lines changed

4 files changed

+42
-38
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
uses: actions/setup-python@v4
1515
with:
1616
python-version: 3.7
17-
- name: Install dependencies
18-
run: pip install twine
17+
- name: Install build and twine
18+
run: pip install build twine
1919
- name: Build package
20-
run: python setup.py sdist
20+
run: python -m build
2121
- name: Publish package to PyPI
2222
uses: pypa/[email protected]
2323
with:

pyproject.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[build-system]
2+
requires = ["setuptools>=77.0.3"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "splunk-sdk"
7+
dynamic = ["version"]
8+
authors = [{ name = "Splunk, Inc.", email = "[email protected]" }]
9+
license = "Apache-2.0"
10+
license-files = ["LICENSE"]
11+
description = "The Splunk Software Development Kit for Python"
12+
readme = "README.md"
13+
dependencies = ["deprecation>=2.1.0"]
14+
classifiers = [
15+
"Programming Language :: Python",
16+
"Development Status :: 6 - Mature",
17+
"Environment :: Other Environment",
18+
"Intended Audience :: Developers",
19+
"Operating System :: OS Independent",
20+
"Topic :: Software Development :: Libraries :: Python Modules",
21+
"Topic :: Software Development :: Libraries :: Application Frameworks",
22+
]
23+
24+
[project.urls]
25+
Homepage = "http://github.com/splunk/splunk-sdk-python"
26+
27+
28+
[project.optional-dependencies]
29+
dev = ["tox>=4.8.0"]
30+
31+
[tool.setuptools]
32+
packages = ["splunklib", "splunklib.modularinput", "splunklib.searchcommands"]

setup.py

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,12 @@
1616

1717
from setuptools import setup
1818

19-
import splunklib
2019

21-
setup(
22-
author="Splunk, Inc.",
20+
def get_version():
21+
with open("splunklib/__init__.py") as f:
22+
for line in f:
23+
if line.startswith("__version__"):
24+
return line.split("=")[1].strip().strip('"').strip("'")
2325

24-
author_email="[email protected]",
2526

26-
description="The Splunk Software Development Kit for Python.",
27-
28-
license="http://www.apache.org/licenses/LICENSE-2.0",
29-
30-
name="splunk-sdk",
31-
32-
packages = ["splunklib",
33-
"splunklib.modularinput",
34-
"splunklib.searchcommands"],
35-
36-
install_requires=[
37-
"deprecation",
38-
],
39-
40-
url="http://github.com/splunk/splunk-sdk-python",
41-
42-
version=splunklib.__version__,
43-
44-
classifiers = [
45-
"Programming Language :: Python",
46-
"Development Status :: 6 - Mature",
47-
"Environment :: Other Environment",
48-
"Intended Audience :: Developers",
49-
"License :: OSI Approved :: Apache Software License",
50-
"Operating System :: OS Independent",
51-
"Topic :: Software Development :: Libraries :: Python Modules",
52-
"Topic :: Software Development :: Libraries :: Application Frameworks",
53-
],
54-
)
27+
setup(version=get_version())

splunklib/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ def setup_logging(level, log_format=DEFAULT_LOG_FORMAT, date_format=DEFAULT_DATE
3030
datefmt=date_format)
3131

3232

33-
__version_info__ = (2, 1, 0)
34-
__version__ = ".".join(map(str, __version_info__))
33+
__version__= "2.1.0"

0 commit comments

Comments
 (0)