-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
62 lines (56 loc) · 2.18 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
from setuptools import setup, find_packages
import os
from datetime import datetime
here = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(here, "rickled", "__version__.py")) as f:
exec(f.read(), about)
# Get the long description from the README file
long_description_file = os.path.join(here, 'pip_description.md')
if os.path.isfile(long_description_file):
with open(long_description_file, "r", encoding='utf-8') as f:
long_description = f.read()
long_description = long_description.format(pypi_metdata_release_date=datetime.today().strftime('%Y-%m-%d'),
pypi_metdata_version_number=about["__version__"])
else:
long_description = "It's Rickle Pick!"
if os.path.isfile(os.path.join(here, 'requirements.txt')):
with open(os.path.join(here, 'requirements.txt'), encoding='utf-8') as f:
pipreq = f.readlines()
# remove pip flag
if '-i http' in pipreq[0]:
pipreq.pop(0)
else:
pipreq = ['pyyaml', 'requests', "tomli;python_version<'3.11'", "tomli-w"]
setup(
name="rickled",
version=about["__version__"],
description='Tools for pickling Python objects in a completely different way',
long_description_content_type='text/markdown',
long_description=long_description,
license='Apache 2.0',
keywords = ['Pickle', 'Python', 'YAML', 'JSON'],
author='Zipfian Science',
author_email='[email protected]',
zip_safe=False,
url='https://github.com/Zipfian-Science/rickle',
download_url='https://github.com/Zipfian-Science/rickle/archive/v_01.tar.gz',
packages=find_packages(".", exclude=("tests", "dist", "deploy", "egg-info")),
include_package_data=True,
install_requires=pipreq,
package_dir={'.': 'rickled'},
extras_require={
'twisted': ['twisted'],
'pyopenssl': ['pyopenssl']
},
entry_points={
'console_scripts': [
'rickle = rickled.cli:main',
],
},
classifiers=[
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Topic :: Software Development']
)