Skip to content

Commit

Permalink
Moved the metadata into setup.cfg from setup.py.
Browse files Browse the repository at this point in the history
Fixed the dependency on poetry instead of poetry-core in pyproject.toml.
Fetching the version from git tags now when using setuptools (for poetry we cannot do that currently, see python-poetry/poetry#693).
  • Loading branch information
KOLANICH committed Feb 16, 2021
1 parent a9dc095 commit da279de
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 50 deletions.
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,7 @@ trio = ['trio']
curio = ['curio', 'sniffio']

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.setuptools_scm]
52 changes: 52 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,54 @@
[metadata]
name = dnspython
author = Bob Halley
author_email = halley@dnspython.org
license = ISC
license_file = LICENSE
description = DNS toolkit
url = http://www.dnspython.org
long_description = dnspython is a DNS toolkit for Python. It supports almost all
record types. It can be used for queries, zone transfers, and dynamic
updates. It supports TSIG authenticated messages and EDNS0.

dnspython provides both high and low level access to DNS. The high
level classes perform queries for data of a given name, type, and
class, and return an answer set. The low level classes allow
direct manipulation of DNS zones, messages, names, and records.
long_description_content_type = text/plain
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Intended Audience :: System Administrators
License :: OSI Approved :: ISC License (ISCL)
Operating System :: POSIX
Operating System :: Microsoft :: Windows
Programming Language :: Python
Topic :: Internet :: Name Service (DNS)
Topic :: Software Development :: Libraries :: Python Modules
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
provides = dns

[options]
packages =
dns
dns.rdtypes
dns.rdtypes.IN
dns.rdtypes.ANY
dns.rdtypes.CH
python_requires = >=3.6
test_suite = tests
setup_requires = setuptools>=44; wheel; setuptools_scm[toml]>=3.4.3

[options.extras_require]
DOH = requests; requests-toolbelt
IDNA = idna>=2.1
DNSSEC = cryptography>=2.6
trio = trio>=0.14.0; sniffio>=1.1
curio = curio>=1.2; sniffio>=1.1

[options.package_data]
dns = py.typed
50 changes: 2 additions & 48 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,64 +20,18 @@
import sys
from setuptools import setup

version = '2.2.0'

try:
sys.argv.remove("--cython-compile")
sys.argv.remove("--cython-compile")
except ValueError:
compile_cython = False
compile_cython = False
else:
compile_cython = True
from Cython.Build import cythonize
ext_modules = cythonize(['dns/*.py', 'dns/rdtypes/*.py', 'dns/rdtypes/*/*.py'],
language_level='3')

kwargs = {
'name' : 'dnspython',
'version' : version,
'description' : 'DNS toolkit',
'long_description' : \
"""dnspython is a DNS toolkit for Python. It supports almost all
record types. It can be used for queries, zone transfers, and dynamic
updates. It supports TSIG authenticated messages and EDNS0.
dnspython provides both high and low level access to DNS. The high
level classes perform queries for data of a given name, type, and
class, and return an answer set. The low level classes allow
direct manipulation of DNS zones, messages, names, and records.""",
'author' : 'Bob Halley',
'author_email' : 'halley@dnspython.org',
'license' : 'ISC',
'url' : 'http://www.dnspython.org',
'packages' : ['dns', 'dns.rdtypes', 'dns.rdtypes.IN', 'dns.rdtypes.ANY',
'dns.rdtypes.CH'],
'package_data' : {'dns': ['py.typed']},
'classifiers' : [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: ISC License (ISCL)",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Topic :: Internet :: Name Service (DNS)",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
'python_requires': '>=3.6',
'test_suite': 'tests',
'provides': ['dns'],
'extras_require': {
'DOH': ['requests', 'requests-toolbelt'],
'IDNA': ['idna>=2.1'],
'DNSSEC': ['cryptography>=2.6'],
'trio': ['trio>=0.14.0', 'sniffio>=1.1'],
'curio': ['curio>=1.2', 'sniffio>=1.1'],
},
'ext_modules': ext_modules if compile_cython else None,
'zip_safe': False if compile_cython else None,
}
Expand Down

0 comments on commit da279de

Please sign in to comment.