|
| 1 | +#!/usr/bin/env python |
1 | 2 | # Copyright Tephi contributors |
2 | 3 | # |
3 | 4 | # This file is part of Tephi and is released under the LGPL license. |
4 | 5 | # See COPYING and COPYING.LESSER in the root of the repository for full |
5 | 6 | # licensing details. |
6 | 7 |
|
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 |
74 | 9 |
|
75 | 10 |
|
76 | 11 | if __name__ == "__main__": |
77 | | - setup(**args) |
| 12 | + setup() |
0 commit comments