Skip to content

Commit 9a3cc4a

Browse files
author
Cecylia Borek
committed
add pyproject remove setup.py
1 parent b39b9d5 commit 9a3cc4a

File tree

5 files changed

+39
-65
lines changed

5 files changed

+39
-65
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
- name: Set up Python
1414
uses: actions/setup-python@v4
1515
with:
16-
python-version: 3.7
17-
- name: Install dependencies
18-
run: pip install twine
16+
python-version: 3.9
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:

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,9 @@ Use `pip`:
4848

4949
[sudo] pip install splunk-sdk
5050

51-
Install the Python egg:
52-
53-
[sudo] pip install --egg splunk-sdk
54-
5551
Install the sources you cloned from GitHub:
5652

57-
[sudo] python setup.py install
53+
[sudo] python -m pip install .
5854

5955
## Testing Quickstart
6056

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+
version = "2.1.0"
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: 0 additions & 54 deletions
This file was deleted.

splunklib/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"""Python library for Splunk."""
1616

1717
import logging
18+
import importlib.metadata
1819

1920
DEFAULT_LOG_FORMAT = '%(asctime)s, Level=%(levelname)s, Pid=%(process)s, Logger=%(name)s, File=%(filename)s, ' \
2021
'Line=%(lineno)s, %(message)s'
@@ -30,5 +31,4 @@ def setup_logging(level, log_format=DEFAULT_LOG_FORMAT, date_format=DEFAULT_DATE
3031
datefmt=date_format)
3132

3233

33-
__version_info__ = (2, 1, 0)
34-
__version__ = ".".join(map(str, __version_info__))
34+
__version__ = importlib.metadata.version("splunk-sdk")

0 commit comments

Comments
 (0)