Skip to content

Commit 853f4d1

Browse files
Merge pull request #122 from vincentbernat/fix/pysnmp7
Add support for PySNMP 7
2 parents a2b4b38 + 1648091 commit 853f4d1

File tree

6 files changed

+279
-192
lines changed

6 files changed

+279
-192
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
python-version:
20-
- "3.8"
2120
- "3.9"
2221
- "3.10"
2322
- "3.11"
2423
- "3.12"
2524
- "3.13"
25+
- "3.14"
2626
steps:
2727
- uses: actions/checkout@v4
2828
with:

pyproject.toml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,48 @@
22
requires = ["setuptools >= 42.0.0", "setuptools_scm", "cffi >= 1.0.0"]
33
build-backend = "setuptools.build_meta"
44

5+
[project]
6+
name = "snimpy"
7+
description = "interactive SNMP tool"
8+
requires-python = ">= 3.9"
9+
dynamic = ["version"]
10+
readme = "README.rst"
11+
license = "ISC"
12+
authors = [
13+
{ name = "Vincent Bernat", email = "bernat@luffy.cx" },
14+
]
15+
classifiers = [
16+
"Development Status :: 4 - Beta",
17+
"Environment :: Console",
18+
"Intended Audience :: System Administrators",
19+
"Operating System :: POSIX",
20+
"Programming Language :: Python :: 3",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
26+
"Programming Language :: Python :: 3.14",
27+
"Topic :: System :: Networking",
28+
"Topic :: Utilities",
29+
"Topic :: System :: Monitoring",
30+
]
31+
dependencies = [
32+
"cffi >= 1.0.0",
33+
"pysnmp >= 7",
34+
"pysnmpcrypto",
35+
"setuptools",
36+
]
37+
38+
[project.scripts]
39+
snimpy = "snimpy.main:interact"
40+
41+
[project.urls]
42+
Homepage = "https://github.com/vincentbernat/snimpy"
43+
44+
[tool.setuptools]
45+
packages = ["snimpy"]
46+
zip-safe = false
47+
548
[tool.setuptools_scm]
649
write_to = "snimpy/_version.py"

setup.py

Lines changed: 4 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,8 @@
11
import os
2-
from setuptools import setup, find_packages
2+
from setuptools import setup
33

44
rtd = os.environ.get("READTHEDOCS", None) == "True"
55

6-
7-
if __name__ == "__main__":
8-
readme = open("README.rst").read()
9-
history = open("HISTORY.rst").read().replace(".. :changelog:", "")
10-
11-
setup(
12-
name="snimpy",
13-
classifiers=[
14-
"Development Status :: 4 - Beta",
15-
"Environment :: Console",
16-
"Intended Audience :: System Administrators",
17-
"License :: OSI Approved :: ISC License (ISCL)",
18-
"Operating System :: POSIX",
19-
"Programming Language :: Python :: 3",
20-
"Topic :: System :: Networking",
21-
"Topic :: Utilities",
22-
"Topic :: System :: Monitoring",
23-
],
24-
url="https://github.com/vincentbernat/snimpy",
25-
description="interactive SNMP tool",
26-
long_description=readme + "\n\n" + history,
27-
long_description_content_type="text/x-rst",
28-
author="Vincent Bernat",
29-
author_email="bernat@luffy.cx",
30-
packages=["snimpy"],
31-
entry_points={
32-
"console_scripts": [
33-
"snimpy = snimpy.main:interact",
34-
],
35-
},
36-
data_files=[("share/man/man1", ["man/snimpy.1"])],
37-
zip_safe=False,
38-
cffi_modules=(not rtd and ["snimpy/smi_build.py:ffi"] or []),
39-
install_requires=[
40-
"cffi >= 1.0.0",
41-
"pysnmp >= 4, < 6",
42-
"pyasn1 <= 0.6.0",
43-
'pyasyncore; python_version >= "3.12"',
44-
"setuptools",
45-
],
46-
setup_requires=["cffi >= 1.0.0", "setuptools_scm"],
47-
use_scm_version=True,
48-
)
6+
setup(
7+
cffi_modules=(not rtd and ["snimpy/smi_build.py:ffi"] or []),
8+
)

0 commit comments

Comments
 (0)