HPI/setup.py
2020-04-12 15:01:03 +01:00

67 lines
1.8 KiB
Python

#!/usr/bin/env python3
from setuptools import setup, find_packages # type: ignore
INSTALL_REQUIRES = [
'appdirs'
]
def main():
setup(
name='my',
version='0.0.20200412',
description='A Python interface to my life',
url='https://github.com/karlicoss/HPI',
author='Dmitrii Gerasimov',
author_email='karlicoss@gmail.com',
classifiers=[
'Programming Language :: Python :: 3 :: Only',
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: End Users/Desktop',
'Topic :: Scientific/Engineering :: Information Analysis',
],
keywords=["pkm", "pim", "quantified-self"],
# TODO eh, perhaps should use 'src'...
# package_dir={'': ''},
packages=find_packages(),
package_data={
'my': [
# for mypy
'py.typed',
# empty dir, necessary for proper dynamic imports
'mycfg_stub/repos/.gitkeep',
],
},
python_requires='>=3.5', # depends on the modules though..
extras_require={
'testing': [
'pytest',
'pytz',
'pylint',
],
},
install_requires=INSTALL_REQUIRES,
)
if __name__ == '__main__':
import argparse
p = argparse.ArgumentParser()
p.add_argument('--dependencies-only', action='store_true')
args, _ = p.parse_known_args()
if args.dependencies_only:
cmd = ['pip3', 'install', '--user', *INSTALL_REQUIRES]
scmd = ' '.join(cmd)
import os
xx = input(f'Run {scmd} [y/n] ')
if xx.strip() == 'y':
os.execvp(
'pip3',
cmd
)
else:
main()