-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
51 lines (42 loc) · 1.09 KB
/
setup.py
File metadata and controls
51 lines (42 loc) · 1.09 KB
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
#!/usr/bin/env python
from setuptools import setup, find_packages
import sys
import subprocess
required_modules = [
"simplejson",
"httplib2",
"unidecode",
"oauth2"
]
readme = ""
try:
with open("README.md", "rb") as f:
readme = f.read()
# avoid ReST at all costs, but make sure we have it for PyPi
proc = subprocess.Popen(
["pandoc", "-fmarkdown", "-trst", "README.md"],
stdout=subprocess.PIPE
)
readme = proc.stdout.read()
except:
if len(sys.argv) >=2:
for command in ["register", "upload"]:
if command in sys.argv[1:]:
raise Exception("Unable to convert Markdown README to ReST for upload to PyPi. Do you have pandoc installed?")
setup(
name="factual",
version="0.1.3",
description="Wrapper for the Factual HTTP API.",
author="Christopher H. Casebeer",
author_email="",
url="https://github.com/casebeer/factual",
packages=find_packages(exclude='tests'),
install_requires=required_modules,
tests_require=["nose"],
test_suite="nose.collector",
long_description=readme,
classifiers=[
"License :: OSI Approved :: BSD License",
"Intended Audience :: Developers",
]
)