Skip to content

Commit

Permalink
Migrate to setup.cfg and pyproject.toml (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamreeve committed Mar 12, 2023
1 parent 1c756a0 commit 22b4e29
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['3.7', '3.8', '3.9', '3.10']
python: ['3.8', '3.9', '3.10', '3.11']
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
7 changes: 5 additions & 2 deletions nptdms/version.py
@@ -1,2 +1,5 @@
__version_info__ = (1, 6, 1)
__version__ = '.'.join('%d' % d for d in __version_info__)
from importlib import metadata


__version__ = metadata.version('nptdms')
__version_info__ = tuple(int(x) for x in __version__.split('.'))
5 changes: 5 additions & 0 deletions pyproject.toml
@@ -0,0 +1,5 @@
[build-system]
requires = [
"setuptools",
]
build-backend = "setuptools.build_meta"
48 changes: 48 additions & 0 deletions setup.cfg
@@ -0,0 +1,48 @@
[metadata]
name = npTDMS
version = 1.6.2
description = Cross-platform, NumPy based module for reading TDMS files produced by LabView
author = Adam Reeve
author_email = adreeve@gmail.com
url = https://github.com/adamreeve/npTDMS
long_description = file: README.rst
license = LGPL
classifiers =
Development Status :: 5 - Production/Stable
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Scientific/Engineering
License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
Intended Audience :: Science/Research
Natural Language :: English

[options]
packages =
nptdms
nptdms.export
nptdms.test
install_requires =
numpy

[options.entry_points]
console_scripts =
tdmsinfo = nptdms.tdmsinfo:main

[options.extras_require]
test =
pytest >= 3.1.0
hypothesis
pytest-benchmark
thermocouples_reference
scipy
pandas =
pandas
hdf =
h5py >= 2.10.0
thermocouple_scaling =

56 changes: 3 additions & 53 deletions setup.py 100644 → 100755
@@ -1,57 +1,7 @@
import os
#!/usr/bin/env python

from setuptools import setup


def read_version():
here = os.path.abspath(os.path.dirname(__file__))
version_path = os.path.sep.join((here, "nptdms", "version.py"))
v_globals = {}
v_locals = {}
exec(open(version_path).read(), v_globals, v_locals)
return v_locals['__version__']


setup(
name = 'npTDMS',
version = read_version(),
description = ("Cross-platform, NumPy based module for reading "
"TDMS files produced by LabView."),
author = 'Adam Reeve',
author_email = 'adreeve@gmail.com',
url = 'https://github.com/adamreeve/npTDMS',
packages = ['nptdms', 'nptdms.export', 'nptdms.test'],
long_description=open('README.rst').read(),
license = 'LGPL',
classifiers = [
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Scientific/Engineering',
'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
'Intended Audience :: Science/Research',
'Natural Language :: English',
],
install_requires = ['numpy'],
extras_require = {
'test': [
'pytest>=3.1.0',
'hypothesis',
'pytest-benchmark',
'thermocouples_reference',
'scipy',
],
'pandas': ['pandas'],
'hdf': ['h5py>=2.10.0'],
'thermocouple_scaling': [], # Kept for backwards compatibility
},
entry_points = """
[console_scripts]
tdmsinfo=nptdms.tdmsinfo:main
"""
)
if __name__ == '__main__':
setup()

0 comments on commit 22b4e29

Please sign in to comment.