-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
36 lines (31 loc) · 1.12 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
#! /usr/bin/env python
from setuptools import setup, find_packages
from os import path, listdir
import re
pkg_name = "calculator"
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), "r") as f:
long_description = f.read()
with open(path.join(here, pkg_name, 'version.py')) as f:
exec(f.read())
requirements = []
if path.isfile(path.join(here, 'requirements.txt')):
with open(path.join(here, 'requirements.txt')) as f:
requirements = ['{pkg} @ {target}#egg={pkg}'.format(pkg=re.search('/([A-Za-z0-9\-]+)\.git',
r).group(1), target=r) if '+' in r else r for r in f.read().split()]
setup(
name=pkg_name,
version=__version__,
author="Raphael Guzman",
author_email="[email protected]",
description="A demo calculator app...",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://doesnt.exist",
packages=find_packages(exclude=['test*', 'docs']),
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
install_requires=requirements,
)