-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
104 lines (94 loc) · 3.4 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#! /usr/bin/env python
# Copyright 2014-2023 Peter Williams <[email protected]> and collaborators.
# Licensed under the MIT License.
# I don't use the ez_setup module because it causes us to automatically build
# and install a new setuptools module, which I'm not interested in doing.
from setuptools import setup
def get_long_desc():
in_preamble = True
lines = []
with open("README.md", "rt", encoding="utf8") as f:
for line in f:
if in_preamble:
if line.startswith("<!--pypi-begin-->"):
in_preamble = False
else:
if line.startswith("<!--pypi-end-->"):
break
else:
lines.append(line)
lines.append(
"""
For more information, including installation instructions, please visit [the
project homepage].
[the project homepage]: https://pwkit.readthedocs.io/
"""
)
return "".join(lines)
setup(
name="pwkit", # cranko project-name
version="0.dev0", # cranko project-version
# This package actually *is* zip-safe, but I've run into issues with
# installing it as a Zip: in particular, the install sometimes fails with
# "bad local file header", and reloading a module after a reinstall in
# IPython gives an ImportError with the same message. These are annoying
# enough and I don't really care so we just install it as flat files.
zip_safe=False,
packages=[
"pwkit",
"pwkit.cli",
"pwkit.environments",
"pwkit.environments.casa",
"pwkit.environments.ciao",
"pwkit.environments.jupyter",
"pwkit.environments.sas",
],
package_data={
"pwkit": ["data/*/*"],
},
# We want to go easy on the requires; some modules are going to require
# more stuff, but others don't need much of anything. But, it's pretty
# much impossible to do science without Numpy. We may actually require
# version 1.8 but for now I'll optimistically hope that we can get away
# with 1.6.
install_requires=[
"numpy >= 1.6",
],
extras_require={
"docs": [
"mock",
"numpydoc",
"sphinx",
"sphinx_rtd_theme",
"sphinx-automodapi",
],
},
entry_points={
"console_scripts": [
"astrotool = pwkit.cli.astrotool:commandline",
"casatask = pwkit.environments.casa.tasks:commandline",
"imtool = pwkit.cli.imtool:commandline",
"latexdriver = pwkit.cli.latexdriver:commandline",
"pkcasascript = pwkit.environments.casa.scripting:commandline",
"pkenvtool = pwkit.environments:commandline",
"wrapout = pwkit.cli.wrapout:commandline",
],
},
author="Peter Williams",
author_email="[email protected]",
description="Miscellaneous scientific and astronomical tools",
license="MIT",
keywords="astronomy science",
url="https://github.com/pkgw/pwkit/",
long_description=get_long_desc(),
long_description_content_type="text/markdown",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Astronomy",
],
)