Correct requires invocation for py3dns

This commit is contained in:
Scott Kitterman
2018-06-16 21:30:53 -04:00
parent f8deb49c0d
commit 45266f6f05
2 changed files with 7 additions and 2 deletions
+1
View File
@@ -7,6 +7,7 @@
- Fix deprecation warnings in test asserts (Daniel Hahler) - Fix deprecation warnings in test asserts (Daniel Hahler)
- Correctly limit try/except for imports to import errors (Daniel Hahler) - Correctly limit try/except for imports to import errors (Daniel Hahler)
- Don't error out in Python 3 if include headers is string (LP: #1776775) - Don't error out in Python 3 if include headers is string (LP: #1776775)
- Correct requires invocation for py3dns
2018-05-18 Version 0.8.0 2018-05-18 Version 0.8.0
- Change from distutils to setuptools with entry points because it's the - Change from distutils to setuptools with entry points because it's the
+6 -2
View File
@@ -19,17 +19,21 @@
# Copyright (c) 2008 Greg Hewgill http://hewgill.com # Copyright (c) 2008 Greg Hewgill http://hewgill.com
# #
# This has been modified from the original software. # This has been modified from the original software.
# Copyright (c) 2011,2012 Scott Kitterman <scott@kitterman.com> # Copyright (c) 2011,2012,2018 Scott Kitterman <scott@kitterman.com>
from setuptools import setup from setuptools import setup
import os import os
import sys
version = "0.8.1" version = "0.8.1"
kw = {} # Work-around for lack of 'or' requires in setuptools. kw = {} # Work-around for lack of 'or' requires in setuptools.
try: try:
import DNS import DNS
kw['install_requires'] = ['PyDNS'] if sys.version_info[0] == 2:
kw['install_requires'] = ['PyDNS']
else:
kw['install_requires'] = ['Py3DNS']
except ImportError: # If PyDNS is not installed, prefer dnspython except ImportError: # If PyDNS is not installed, prefer dnspython
kw['install_requires'] = ['dnspython'] kw['install_requires'] = ['dnspython']