-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·65 lines (57 loc) · 1.61 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
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import re
try:
from setuptools import setup
setup
except ImportError:
from distutils.core import setup
setup
if sys.argv[-1] == "publish":
os.system("python setup.py sdist upload")
sys.exit()
# Handle encoding
major, minor1, minor2, release, serial = sys.version_info
if major >= 3:
def rd(filename):
f = open(filename, encoding="utf-8")
r = f.read()
f.close()
return r
else:
def rd(filename):
f = open(filename)
r = f.read()
f.close()
return r
vre = re.compile("__version__ = \"(.*?)\"")
m = rd(os.path.join(os.path.dirname(os.path.abspath(__file__)),
"emcee", "__init__.py"))
version = vre.findall(m)[0]
setup(
name="emcee",
version=version,
author="Daniel Foreman-Mackey",
author_email="[email protected]",
packages=["emcee"],
url="http://dan.iel.fm/emcee/",
license="MIT",
description="Kick ass affine-invariant ensemble MCMC sampling",
long_description=rd("README.rst") + "\n\n"
+ "Changelog\n"
+ "---------\n\n"
+ rd("HISTORY.rst"),
package_data={"": ["LICENSE", "AUTHORS.rst"]},
include_package_data=True,
install_requires=["numpy"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
],
)