Skip to content

Commit 098a06f

Browse files
committed
Switch to pyproject.toml for setup.
1 parent 1c7b037 commit 098a06f

File tree

6 files changed

+44
-41
lines changed

6 files changed

+44
-41
lines changed

README.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ earlier versions:
4141
### Usage
4242

4343
```
44-
resolve.py version 0.6.6
44+
resolve.py version 0.6.7
4545
Perform iterative resolution of a DNS name, type, and class.
4646
4747
Usage: resolve.py [Options] <qname> [<qtype>] [<qclass>]
@@ -68,25 +68,17 @@ class per line.
6868

6969
### Installation
7070

71-
To install the pre-requisite python cryptography package system wide:
72-
73-
* (as root) pip3 install "cryptography>=3.0"
74-
75-
To install the pre-requisite python cryptography package locally for the user:
76-
77-
* pip3 install --user "cryptography>=3.0"
78-
7971
To install system wide:
8072

81-
* (as root) pip3 install git+https://github.com/shuque/[email protected].6
73+
* (as root) pip3 install git+https://github.com/shuque/[email protected].7
8274

8375
To install for your own account:
8476

85-
* pip3 install git+https://github.com/shuque/[email protected].6
77+
* pip3 install git+https://github.com/shuque/[email protected].7
8678

87-
To install in a python virtual environment, just:
79+
To install from a local copy of this repository:
8880

89-
* python3 setup.py install
81+
* pip3 install .
9082

9183

9284
### Examples

pyproject.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "resolve"
7+
dynamic = ["version"]
8+
license = "MIT"
9+
10+
authors = [
11+
{ name = "Shumon Huque", email = "[email protected]" },
12+
]
13+
description = "Command line iterative DNS resolver functions"
14+
readme = "README.md"
15+
requires-python = ">=3.7"
16+
classifiers = [
17+
"Programming Language :: Python :: 3",
18+
"Operating System :: OS Independent",
19+
]
20+
dependencies = [
21+
"cryptography>=3.0",
22+
"dnspython>=2.6.0",
23+
]
24+
25+
[project.urls]
26+
Homepage = "https://github.com/shuque/resolve"
27+
Issues = "https://github.com/shuque/resolve/issues"
28+
29+
[tool.setuptools]
30+
packages = ["reslib"]
31+
script-files = ['resolve.py']
32+
33+
[tool.setuptools.dynamic]
34+
version = {attr = "reslib.version.__version__"}

reslib/usage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import os
66
import sys
7-
from reslib.version import VERSION
7+
from reslib.version import __version__
88
from reslib.prefs import Prefs
99

1010
PROGNAME = os.path.basename(sys.argv[0])
@@ -37,5 +37,5 @@ def usage(message=None):
3737
3838
When using -b, <batchfile> contains one (space separated) query name, type,
3939
class per line.
40-
""".format(PROGNAME, VERSION, Prefs.PAYLOAD))
40+
""".format(PROGNAME, __version__, Prefs.PAYLOAD))
4141
sys.exit(1)

reslib/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Version string.
33
"""
44

5-
VERSION = "0.6.6"
5+
__version__ = "0.6.6"

setup.py

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

test_resolve.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import unittest
88

9-
from reslib.version import VERSION
9+
from reslib.version import __version__
1010
from reslib.exception import ResError
1111
from reslib.prefs import Prefs
1212
from reslib.cache import cache, RootZone, get_root_zone
@@ -231,7 +231,7 @@ class TestAll(unittest.TestCase):
231231
"""
232232

233233
def setUp(self):
234-
print("reslib version {} ..\n".format(VERSION))
234+
print("reslib version {} ..\n".format(__version__))
235235

236236
def xx_test_plain(self):
237237
"""Plain DNS tests"""

0 commit comments

Comments
 (0)