Skip to content

Commit b866054

Browse files
authored
move to setup.cfg (#48)
1 parent 3043cbf commit b866054

File tree

3 files changed

+62
-80
lines changed

3 files changed

+62
-80
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
<h1 align="center">
2-
<a href="https://tephi.readthedocs.io/en/latest/" style="display: block; margin: 0 auto;">
3-
<img src="https://scitools.github.io/tephi/tephi-logo-200-137.png"
4-
style="max-width: 40%;" alt="Tephi"></a><br>
5-
</h1>
1+
<p align="center">
2+
<a href="https://tephi.readthedocs.io/en/latest/">
3+
<img src="https://scitools.github.io/tephi/tephi-logo-200-137.png" alt="Tephi">
4+
</a>
5+
</p>
66

7-
<h4 align="center">
8-
Tephigram plotting in Python
9-
</h4>
7+
<p align="center"><strong>Tephigram plotting in Python</strong></p>
108

119
<p align="center">
1210
<a href="https://travis-ci.org/github/SciTools/tephi/branches">

setup.cfg

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[aliases]
2-
test = pytest
3-
41
[flake8]
52
exclude =
63
.git,
@@ -17,5 +14,57 @@ addopts =
1714
--cov-config=.coveragerc
1815
--cov=tephi
1916
--cov-report=term-missing
20-
# --doctest-modules
17+
# --doctest-modules
2118
#doctest_optionflags = NORMALIZE_WHITESPACE ELLIPSIS
19+
20+
[metadata]
21+
name = tephi
22+
version = attr: tephi.__version__
23+
author = UK Met Office
24+
author_email = [email protected]
25+
url = https://github.com/SciTools/tephi
26+
classifiers =
27+
Development Status :: 4 - Beta
28+
Intended Audience :: Science/Research
29+
Operating System :: OS Independent
30+
License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
31+
Programming Language :: Python
32+
Programming Language :: Python :: 3
33+
Programming Language :: Python :: 3.6
34+
Programming Language :: Python :: 3.7
35+
Programming Language :: Python :: 3.8
36+
Topic :: Scientific/Engineering :: Atmospheric Science
37+
Topic :: Scientific/Engineering :: Visualization
38+
license = LGPL-3.0
39+
license_file = COPYING.LESSER
40+
description = Tephigram plotting in Python
41+
long_description = file: README.md
42+
long_description_content_type = text/markdown
43+
project_urls =
44+
code = https://github.com/SciTools/tephi
45+
issues = https://github.com/SciTools/tephi/issues
46+
binder = https://mybinder.org/v2/gh/SciTools/tephi/master?filepath=index.ipynb
47+
documentation = https://tephi.readthedocs.io/en/latest/
48+
keywords =
49+
tephigram
50+
radiosonde
51+
meteorology
52+
visualization
53+
54+
[options]
55+
packages = find:
56+
setup_requires =
57+
setuptools>=40.8.0
58+
wheel
59+
install_requires =
60+
matplotlib
61+
numpy
62+
scipy
63+
python_requires = >=3.6
64+
65+
[options.package_data]
66+
tephi =
67+
etc/test_data/*.txt
68+
tests/results/*.npz
69+
tests/results/imagerepo.json
70+

setup.py

Lines changed: 3 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,12 @@
1+
#!/usr/bin/env python
12
# Copyright Tephi contributors
23
#
34
# This file is part of Tephi and is released under the LGPL license.
45
# See COPYING and COPYING.LESSER in the root of the repository for full
56
# licensing details.
67

7-
8-
import os
9-
from setuptools import find_packages, setup
10-
11-
12-
NAME = "tephi"
13-
DIR = os.path.abspath(os.path.dirname(__file__))
14-
15-
16-
def extract_version():
17-
version = None
18-
fname = os.path.join(DIR, NAME, "__init__.py")
19-
with open(fname, "r") as fi:
20-
for line in fi:
21-
if line.startswith("__version__"):
22-
_, version = line.split("=")
23-
version = version.strip()[1:-1] # Remove quotation characters
24-
break
25-
return version
26-
27-
28-
def load(fname):
29-
result = []
30-
with open(fname, "r") as fi:
31-
result = [package.strip() for package in fi.readlines()]
32-
return result
33-
34-
35-
def long_description():
36-
with open(os.path.join(DIR, "README.md"), "r") as fi:
37-
long_description = "".join(fi.readlines())
38-
return long_description
39-
40-
41-
args = dict(
42-
name=NAME,
43-
version=extract_version(),
44-
author="UK Met Office",
45-
url="https://github.com/SciTools/tephi",
46-
license="LGPLv3+",
47-
keywords=["tephigram", "radiosonde", "meteorology",],
48-
packages=find_packages(),
49-
package_data={
50-
"tephi": [
51-
"etc/test_data/*.txt",
52-
"tests/results/*.npz",
53-
"tests/results/*.json",
54-
]
55-
},
56-
classifiers=[
57-
"License :: OSI Approved :: "
58-
"GNU Lesser General Public License v3 or later (LGPLv3+)",
59-
"Programming Language :: Python",
60-
"Programming Language :: Python :: 3",
61-
"Programming Language :: Python :: 3.6",
62-
"Programming Language :: Python :: 3.7",
63-
"Programming Language :: Python :: 3.8",
64-
],
65-
description="Tephigram plotting in Python",
66-
long_description=long_description(),
67-
long_description_content_type="text/markdown",
68-
setup_requires=["setuptools>=40.8.0", "pytest-runner"],
69-
install_requires=load("requirements.txt"),
70-
tests_require=load("requirements-dev.txt"),
71-
test_suite=f"{NAME}.tests",
72-
python_requires=">=3.6",
73-
)
8+
from setuptools import setup
749

7510

7611
if __name__ == "__main__":
77-
setup(**args)
12+
setup()

0 commit comments

Comments
 (0)