Skip to content

Commit

Permalink
Merge pull request #144 from pllim/distutils-deprecation
Browse files Browse the repository at this point in the history
MNT: Stop using deprecated distutils
  • Loading branch information
pllim committed Dec 21, 2021
2 parents ea58936 + abdba39 commit f4276b3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ sphinx:
fail_on_warning: true

python:
version: 3.7
system_packages: true
version: 3.8
install:
- method: pip
path: .
Expand Down
10 changes: 0 additions & 10 deletions lib/stsci/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +0,0 @@
try:
# As long as we're using setuptools/distribute, we need to do this the
# setuptools way or else pkg_resources will throw up unncessary and
# annoying warnings (even though the namespace mechanism will still
# otherwise work without it).
# Get rid of this as soon as setuptools/distribute is dead.
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
pass
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
4 changes: 2 additions & 2 deletions lib/stsci/tools/stpyfits.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# overridden, but with fits's new extension system it's not necessary
from astropy.io.fits.util import _is_int
from astropy.utils import lazyproperty
from distutils.version import LooseVersion
from packaging.version import Version

ASTROPY_VER_GE32 = LooseVersion(astropy.__version__) >= LooseVersion('3.2')
ASTROPY_VER_GE32 = Version(astropy.__version__) >= Version('3.2')

STPYFITS_ENABLED = False # Not threadsafe TODO: (should it be?)

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ zip_safe = False
setup_requires =
setuptools_scm
install_requires =
packaging
numpy
astropy>=2
python_requires = >=3.6
Expand Down

0 comments on commit f4276b3

Please sign in to comment.