Skip to content

Commit

Permalink
Merge pull request #106 from astrofrog/fix-deprecations
Browse files Browse the repository at this point in the history
Fix distutils deprecation warnings and update infrastructure
  • Loading branch information
astrofrog authored Mar 21, 2024
2 parents 7793b2a + a7a015c commit fa70134
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 61 deletions.
11 changes: 6 additions & 5 deletions glue_wwt/viewer/table_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@

import pywwt
from pywwt.layers import TableLayer
from distutils.version import LooseVersion
PYWWT_LT_06 = LooseVersion(pywwt.__version__) < '0.6'
from packaging.version import Version

PYWWT_LT_06 = Version(pywwt.__version__) < Version('0.6')

# 0.13 is the first version that uses the WWT research app as the JS backend
PYWWT_GE_013 = LooseVersion(pywwt.__version__) >= '0.13'
PYWWT_GE_013 = Version(pywwt.__version__) >= Version('0.13')

# 0.9 is the first version that grabs the SDK from the WWT CDN
PYWWT_LT_09 = LooseVersion(pywwt.__version__) < '0.9'
PYWWT_LT_09 = Version(pywwt.__version__) < Version('0.9')

# 0.15 is the first version with the updated engine
PYWWT_GE_015 = LooseVersion(pywwt.__version__) >= '0.15'
PYWWT_GE_015 = Version(pywwt.__version__) >= Version('0.15')


__all__ = ['WWTTableLayerArtist']
Expand Down
54 changes: 54 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[build-system]
requires = [
"setuptools>=61.2",
"setuptools_scm",
]
build-backend = "setuptools.build_meta"

[project]
name = "glue-wwt"
authors = [{name = "Thomas Robitaille", email = "[email protected]"}]
license = {text = "BSD 3-Clause License"}
description = "Glue WorldWide Telescope plugin"
readme = "README.rst"
urls = {Homepage = "https://github.com/glue-viz/glue-wwt"}
requires-python = ">=3.8"
dependencies = [
"numpy",
"glue-core>=1.13.1",
"echo",
"astropy",
"pywwt>=0.21.0",
"packaging",
]
dynamic = ["version"]

[tool.setuptools_scm]

[project.entry-points]
"glue.plugins" = {wwt = "glue_wwt:setup"}

[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
"mock",
]
qt = [
"qtpy",
"glue-qt",
'PyQt5;python_version>="3"',
'PyQtWebEngine;python_version>="3"',
]

[tool.setuptools]
zip-safe = false
license-files = ["LICENSE"]
include-package-data = false

[tool.setuptools.packages]
find = {namespaces = false}

[tool.setuptools.package-data]
"glue_wwt.viewer" = ["*.ui", "*.html", "*.js", "*.png"]
"glue_wwt.viewer.tests" = ["data/*.glu"]
40 changes: 0 additions & 40 deletions setup.cfg

This file was deleted.

16 changes: 0 additions & 16 deletions setup.py

This file was deleted.

0 comments on commit fa70134

Please sign in to comment.