-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
69 lines (56 loc) · 1.92 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
from __future__ import print_function
import os.path
import sys
from setuptools import find_packages
from setuptools import setup
# Robust-but-boilerplate code to detect the README path
#
# Note: For some reason, `tox` doesn't copy README.md into its build
# directory. So, allow this to not exist.
base_path = os.path.dirname(os.path.abspath(__file__))
readme_path = os.path.join(base_path, 'README.md')
# Default docs, in case the pandoc stuff doesn't work
readme_rst = """vimap -- variations on imap, not in C
The vimap package is designed to provide a more flexible alternative for
multiprocessing.imap_unordered. It aspires to support HTTP-like clients
processing data, though contains nothing client-specific.
"""
# Mumbo jumbo to convert Markdown --> RST for PyPI
#
# brew install pandoc # or whatever for your OS
# pip install pyandoc
if os.path.isfile(readme_path):
try:
import pandoc
except ImportError:
print(
"WARNING: COULD NOT IMPORT pandoc; YOU WON'T HAVE A NICE README",
file=sys.stderr
)
else:
def get_rst(markdown_file):
doc = pandoc.Document()
doc.markdown = open(markdown_file).read()
return doc.rst
readme_rst = get_rst(readme_path)
setup(
name="vimap",
version="0.2.3",
provides=["vimap"],
author="gatoatigrado",
author_email="gatoatigrado@gmail.com",
url="https://github.com/gatoatigrado/vimap",
description='vimap',
classifiers=[
"Programming Language :: Python",
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
"Topic :: Software Development :: Libraries :: Python Modules",
"Intended Audience :: Developers",
"Development Status :: 3 - Alpha",
],
install_requires=[],
packages=find_packages(exclude=['tests*']),
# mumbo-jumbo for PyPI :(
long_description=readme_rst
)