From 9a5fe6b805ec87d1229ad7c2c41fa1ffb17210b1 Mon Sep 17 00:00:00 2001 From: secynic Date: Tue, 15 Oct 2024 02:19:15 -0500 Subject: [PATCH 1/2] v1.3.0 --- LICENSE.txt | 2 +- ipwhois/__init__.py | 2 +- ipwhois/asn.py | 2 +- ipwhois/docs/source/conf.py | 2 +- ipwhois/exceptions.py | 2 +- ipwhois/hr.py | 2 +- ipwhois/ipwhois.py | 2 +- ipwhois/net.py | 2 +- ipwhois/nir.py | 2 +- ipwhois/rdap.py | 2 +- ipwhois/scripts/docs/generate_examples.py | 2 +- ipwhois/scripts/ipwhois_cli.py | 2 +- ipwhois/scripts/ipwhois_utils_cli.py | 2 +- ipwhois/utils.py | 2 +- ipwhois/whois.py | 2 +- pyproject.toml | 5 ++ setup.cfg | 54 +++++++++++++ setup.py | 94 ----------------------- 18 files changed, 74 insertions(+), 109 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/LICENSE.txt b/LICENSE.txt index be67aadd..f8e3ba95 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2013-2020 Philip Hane +Copyright (c) 2013-2024 Philip Hane All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/__init__.py b/ipwhois/__init__.py index 57d99e7d..1512ee52 100644 --- a/ipwhois/__init__.py +++ b/ipwhois/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/asn.py b/ipwhois/asn.py index b57a775a..0b20fa91 100644 --- a/ipwhois/asn.py +++ b/ipwhois/asn.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/docs/source/conf.py b/ipwhois/docs/source/conf.py index 71e7c6e8..e859ad81 100644 --- a/ipwhois/docs/source/conf.py +++ b/ipwhois/docs/source/conf.py @@ -60,7 +60,7 @@ # General information about the project. project = 'ipwhois' -copyright = '2013-2020, Philip Hane' +copyright = '2013-2024, Philip Hane' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/ipwhois/exceptions.py b/ipwhois/exceptions.py index 88251876..d59c4374 100644 --- a/ipwhois/exceptions.py +++ b/ipwhois/exceptions.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/hr.py b/ipwhois/hr.py index 31383b7b..dc120ce4 100644 --- a/ipwhois/hr.py +++ b/ipwhois/hr.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/ipwhois.py b/ipwhois/ipwhois.py index d89471d9..78ccdf76 100644 --- a/ipwhois/ipwhois.py +++ b/ipwhois/ipwhois.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/net.py b/ipwhois/net.py index a9046546..db502ab3 100644 --- a/ipwhois/net.py +++ b/ipwhois/net.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/nir.py b/ipwhois/nir.py index b3c79efb..e7e12ed8 100644 --- a/ipwhois/nir.py +++ b/ipwhois/nir.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/rdap.py b/ipwhois/rdap.py index 5779f811..1abf0dd8 100644 --- a/ipwhois/rdap.py +++ b/ipwhois/rdap.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/scripts/docs/generate_examples.py b/ipwhois/scripts/docs/generate_examples.py index daca6ac8..884c2aac 100644 --- a/ipwhois/scripts/docs/generate_examples.py +++ b/ipwhois/scripts/docs/generate_examples.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/scripts/ipwhois_cli.py b/ipwhois/scripts/ipwhois_cli.py index c36b7919..d5409c37 100644 --- a/ipwhois/scripts/ipwhois_cli.py +++ b/ipwhois/scripts/ipwhois_cli.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/scripts/ipwhois_utils_cli.py b/ipwhois/scripts/ipwhois_utils_cli.py index d2895d2b..5d7b0554 100644 --- a/ipwhois/scripts/ipwhois_utils_cli.py +++ b/ipwhois/scripts/ipwhois_utils_cli.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/utils.py b/ipwhois/utils.py index b609c8c6..e3a6d799 100644 --- a/ipwhois/utils.py +++ b/ipwhois/utils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/ipwhois/whois.py b/ipwhois/whois.py index de443d65..4868cc97 100644 --- a/ipwhois/whois.py +++ b/ipwhois/whois.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2020 Philip Hane +# Copyright (c) 2013-2024 Philip Hane # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..7152afd2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +[build-system] +requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3"] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 3480374b..6b905ad7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,56 @@ +[metadata] +name = ipwhois +version = 1.3.0 +author = Philip Hane +author_email = secynic@gmail.com +license = BSD +description = Retrieve and parse whois data for IPv4 and IPv6 addresses. +long_description = file: README.rst, CHANGES.rst +long_description_content_type = text/x-rst +keywords = + Python, WHOIS, RWhois, Referral Whois, ASN, IP Address, IP, IPv4, IPv6, + IETF, REST, Arin, Ripe, Apnic, Lacnic, Afrinic, NIC, National Information + Center, RDAP, RIR, Regional Internet Registry, NIR, National Internet + Registry, ASN origin, Origin +url = https://github.com/secynic/ipwhois +download_url = https://github.com/secynic/ipwhois/tarball/master +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + Intended Audience :: Information Technology + Intended Audience :: Science/Research + License :: OSI Approved :: BSD License + Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 + Topic :: Internet + Topic :: Software Development + +[options] +packages = ipwhois, ipwhois.scripts +install_requires = + dnspython + ipaddr==2.2.0;python_version<"3.3" + defusedxml + +[options.entry_points] +console_scripts = + ipwhois_cli = ipwhois.scripts.ipwhois_cli:main + ipwhois_utils_cli = ipwhois.scripts.ipwhois_utils_cli:main + +[options.package_data] +ipwhois = data/*.xml; data/*.csv + [bdist_wheel] universal=1 \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 3bb5d18e..00000000 --- a/setup.py +++ /dev/null @@ -1,94 +0,0 @@ -# Filename: setup.py - -from setuptools import setup -import io - -NAME = 'ipwhois' -VERSION = '1.3.0' -AUTHOR = 'Philip Hane' -AUTHOR_EMAIL = 'secynic@gmail.com' -DESCRIPTION = 'Retrieve and parse whois data for IPv4 and IPv6 addresses.' -KEYWORDS = ' '.join([ - 'Python', - 'WHOIS', - 'RWhois', - 'Referral Whois', - 'ASN', - 'IP Address', - 'IP', - 'IPv4', - 'IPv6', - 'IETF', - 'REST', - 'Arin', - 'Ripe', - 'Apnic', - 'Lacnic', - 'Afrinic', - 'NIC', - 'National Information Center', - 'RDAP', - 'RIR', - 'Regional Internet Registry' - 'NIR', - 'National Internet Registry', - 'ASN origin', - 'Origin' -]) - -README = io.open(file='README.rst', mode='r', encoding='utf-8').read() -CHANGES = io.open(file='CHANGES.rst', mode='r', encoding='utf-8').read() -LONG_DESCRIPTION = '\n\n'.join([README, CHANGES]) -LICENSE = 'BSD' - -URL = 'https://github.com/secynic/ipwhois' -DOWNLOAD_URL = 'https://github.com/secynic/ipwhois/tarball/master' -CLASSIFIERS = [ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Intended Audience :: Information Technology', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: BSD License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Topic :: Internet', - 'Topic :: Software Development', -] - -PACKAGES = ['ipwhois'] - -PACKAGE_DATA = {'ipwhois': ['data/*.xml', 'data/*.csv']} - -INSTALL_REQUIRES = ['dnspython', 'ipaddr==2.2.0;python_version<"3.3"', - 'defusedxml'] - -setup( - name=NAME, - version=VERSION, - author=AUTHOR, - author_email=AUTHOR_EMAIL, - description=DESCRIPTION, - keywords=KEYWORDS, - long_description=LONG_DESCRIPTION, - license=LICENSE, - url=URL, - download_url=DOWNLOAD_URL, - classifiers=CLASSIFIERS, - packages=PACKAGES, - package_data=PACKAGE_DATA, - install_requires=INSTALL_REQUIRES, - scripts=['ipwhois/scripts/ipwhois_cli.py', - 'ipwhois/scripts/ipwhois_utils_cli.py'] -) From 3c06ebe22efc690fbbd2514a7ae18348a0a86a3c Mon Sep 17 00:00:00 2001 From: secynic Date: Tue, 15 Oct 2024 02:58:39 -0500 Subject: [PATCH 2/2] v1.3.0 --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7152afd2..9787c3bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,3 @@ [build-system] -requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3"] +requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" - -[tool.setuptools_scm] \ No newline at end of file