Skip to content

Commit

Permalink
Fix versioning.
Browse files Browse the repository at this point in the history
  • Loading branch information
vnmabus committed Mar 24, 2022
1 parent c1aebb5 commit fe1bdb6
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 40 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include MANIFEST.in
include VERSION
include rdata/VERSION
include LICENSE
include rdata/py.typed
include *.txt
File renamed without changes.
14 changes: 14 additions & 0 deletions rdata/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""rdata: Read R datasets from Python."""
import errno as _errno
import os as _os
import pathlib as _pathlib

Expand All @@ -13,3 +15,15 @@ def _get_test_data_path() -> _pathlib.Path:
Path of the test data.
"""

try:
with open(
_pathlib.Path(_os.path.dirname(__file__)) / 'VERSION',
'r',
) as version_file:
__version__ = version_file.read().strip()
except IOError as e:
if e.errno != _errno.ENOENT:
raise

__version__ = "0.0"
86 changes: 47 additions & 39 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
language or its libraries, and thus it is released under a MIT license.
"""
import os
import pathlib
import sys

from setuptools import find_packages, setup
Expand All @@ -16,44 +17,51 @@

DOCLINES = (__doc__ or '').split("\n")

with open(os.path.join(os.path.dirname(__file__),
'VERSION'), 'r') as version_file:
with open(
pathlib.Path(os.path.dirname(__file__)) / 'rdata' / 'VERSION',
'r',
) as version_file:
version = version_file.read().strip()

setup(name='rdata',
version=version,
description=DOCLINES[1],
long_description="\n".join(DOCLINES[3:]),
url='https://github.com/vnmabus/rdata',
author='Carlos Ramos Carreño',
author_email='[email protected]',
include_package_data=True,
platforms=['any'],
license='MIT',
packages=find_packages(),
python_requires='>=3.7, <4',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Software Development :: Libraries :: Python Modules',
'Typing :: Typed',
],
keywords=['rdata', 'r', 'dataset'],
install_requires=['numpy',
'xarray',
'pandas'],
setup_requires=pytest_runner,
tests_require=['pytest-cov',
'numpy>=1.14' # The printing format for numpy changes
],
test_suite='rdata.tests',
zip_safe=False)
setup(
name='rdata',
version=version,
description=DOCLINES[1],
long_description="\n".join(DOCLINES[3:]),
url='https://github.com/vnmabus/rdata',
author='Carlos Ramos Carreño',
author_email='[email protected]',
include_package_data=True,
platforms=['any'],
license='MIT',
packages=find_packages(),
python_requires='>=3.7, <4',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Software Development :: Libraries :: Python Modules',
'Typing :: Typed',
],
keywords=['rdata', 'r', 'dataset'],
install_requires=[
'numpy',
'xarray',
'pandas',
],
setup_requires=pytest_runner,
tests_require=[
'pytest-cov',
'numpy>=1.14', # The printing format for numpy changes
],
test_suite='rdata.tests',
zip_safe=False,
)

0 comments on commit fe1bdb6

Please sign in to comment.