Skip to content

Commit 5096f71

Browse files
author
Takaya Uchida
committed
switch to versioneer
1 parent 98b4158 commit 5096f71

File tree

8 files changed

+2426
-86
lines changed

8 files changed

+2426
-86
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
xrft/_version.py export-subst

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include versioneer.py
2+
include xrft/_version.py

setup.cfg

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

setup.py

Lines changed: 67 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,74 @@
11
import os
2+
import versioneer
23
from setuptools import setup, find_packages
34
PACKAGES = find_packages()
45

5-
# Get version and release info, which is all stored in xrft/version.py
6-
ver_file = os.path.join('xrft', 'version.py')
7-
with open(ver_file) as f:
8-
exec(f.read())
6+
VERSION = 'v0.1'
7+
DISTNAME = 'xrft'
8+
LICENSE = 'MIT'
9+
AUTHOR = 'xrft Developers'
10+
AUTHOR_EMAIL = '[email protected]'
11+
URL = 'https://github.com/xgcm/xrft'
12+
CLASSIFIERS = [
13+
'Development Status :: 3 - Beta',
14+
'License :: OSI Approved :: Apache Software License',
15+
'Operating System :: OS Independent',
16+
'Intended Audience :: Science/Research',
17+
'Programming Language :: Python',
18+
'Programming Language :: Python :: 2',
19+
'Programming Language :: Python :: 2.7',
20+
'Programming Language :: Python :: 3',
21+
'Programming Language :: Python :: 3.5',
22+
'Programming Language :: Python :: 3.6',
23+
'Topic :: Scientific/Engineering',
24+
]
925

10-
opts = dict(name=NAME,
11-
maintainer=MAINTAINER,
12-
maintainer_email=MAINTAINER_EMAIL,
13-
description=DESCRIPTION,
14-
long_description=LONG_DESCRIPTION,
15-
url=URL,
16-
download_url=DOWNLOAD_URL,
17-
license=LICENSE,
18-
classifiers=CLASSIFIERS,
19-
author=AUTHOR,
20-
author_email=AUTHOR_EMAIL,
21-
platforms=PLATFORMS,
22-
version=VERSION,
23-
packages=PACKAGES,
24-
package_data=PACKAGE_DATA,
25-
requires=REQUIRES)
26+
INSTALL_REQUIRES = ['xarray', 'dask', 'numpy', 'future', 'docrep']
27+
SETUP_REQUIRES = ['pytest-runner']
28+
TESTS_REQUIRE = ['pytest >= 2.8', 'coverage']
2629

30+
DESCRIPTION = "Discrete Fourier Transform with xarray"
31+
def readme():
32+
with open('README.md') as f:
33+
return f.read()
2734

28-
if __name__ == '__main__':
29-
setup(**opts)
35+
setup(name=DISTNAME,
36+
version=versioneer.get_version(),
37+
cmdclass=versioneer.get_cmdclass(),
38+
license=LICENSE,
39+
author=AUTHOR,
40+
author_email=AUTHOR_EMAIL,
41+
classifiers=CLASSIFIERS,
42+
description=DESCRIPTION,
43+
long_description=readme(),
44+
install_requires=INSTALL_REQUIRES,
45+
setup_requires=SETUP_REQUIRES,
46+
tests_require=TESTS_REQUIRE,
47+
url=URL,
48+
packages=find_packages())
49+
50+
# # Get version and release info, which is all stored in xrft/version.py
51+
# ver_file = os.path.join('xrft', 'version.py')
52+
# with open(ver_file) as f:
53+
# exec(f.read())
54+
55+
# opts = dict(name=NAME,
56+
# maintainer=MAINTAINER,
57+
# maintainer_email=MAINTAINER_EMAIL,
58+
# description=DESCRIPTION,
59+
# long_description=LONG_DESCRIPTION,
60+
# url=URL,
61+
# download_url=DOWNLOAD_URL,
62+
# license=LICENSE,
63+
# classifiers=CLASSIFIERS,
64+
# author=AUTHOR,
65+
# author_email=AUTHOR_EMAIL,
66+
# platforms=PLATFORMS,
67+
# version=VERSION,
68+
# packages=PACKAGES,
69+
# package_data=PACKAGE_DATA,
70+
# requires=REQUIRES)
71+
#
72+
#
73+
# if __name__ == '__main__':
74+
# setup(**opts)

0 commit comments

Comments
 (0)