Skip to content

Commit fdefa5a

Browse files
committed
Drop versioneer
1 parent 4101321 commit fdefa5a

File tree

4 files changed

+11
-497
lines changed

4 files changed

+11
-497
lines changed

setup.cfg

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +0,0 @@
1-
[versioneer]
2-
VCS = git
3-
style = pep440
4-
versionfile_source = vpython/_version.py
5-
versionfile_build = vpython/_version.py
6-
tag_prefix =
7-
parentdir_prefix =

setup.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,13 @@
1616
except ImportError:
1717
extensions = [Extension('vpython.cyvector', ['vpython/cyvector.c'])]
1818

19-
import versioneer
2019

2120
install_requires = ['jupyter', 'jupyter-server-proxy', 'numpy', 'ipykernel',
2221
'autobahn>=18.8.2, <=21.11.1']
2322

2423
setup_args = dict(
2524
name='vpython',
2625
packages=['vpython'],
27-
version=versioneer.get_version(),
28-
cmdclass=versioneer.get_cmdclass(),
2926
description='VPython for Jupyter Notebook',
3027
long_description=open('README.md').read(),
3128
long_description_content_type="text/markdown",

vpython/__init__.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
from ._version import get_versions
1+
from pkg_resources import get_distribution, DistributionNotFound
2+
23
from .gs_version import glowscript_version
3-
__version__ = get_versions()['version']
4+
5+
try:
6+
__version__ = get_distribution(__name__).version
7+
except DistributionNotFound:
8+
# package is not installed
9+
pass
410
__gs_version__ = glowscript_version()
5-
del get_versions
11+
612
del glowscript_version
13+
del get_distribution
14+
del DistributionNotFound
715

816
# Keep the remaining imports later to ensure that __version__ and
917
# __gs_version__ exist before importing vpython, which itself imports

0 commit comments

Comments
 (0)