From d3f8819dc7cc0e145813cea21fc1020d381b3822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Gardfj=C3=A4ll?= Date: Tue, 7 Apr 2020 20:41:07 +0200 Subject: [PATCH] update setup.py in preparation for PyPi release --- setup.py | 82 +++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 64 insertions(+), 18 deletions(-) diff --git a/setup.py b/setup.py index c98ac8d..7351e88 100644 --- a/setup.py +++ b/setup.py @@ -1,27 +1,73 @@ -#!/usr/bin/env python - """Setup information for the Garmin Connect activity exporter.""" -from setuptools import find_packages -from distutils.core import setup +from setuptools import setup, find_packages +from os import path +# needed for Python 2.7 (ensures open() defaults to text mode with universal +# newlines, and accepts an argument to specify the text encoding. +from io import open + +here = path.abspath(path.dirname(__file__)) + +with open(path.join(here, 'README.md'), encoding='utf-8') as f: + long_description = f.read() + +requires = [ + 'requests~=2.21', + 'python-dateutil~=2.4', + 'future~=0.16', +] + +test_requires = [ + 'nose~=1.3', + 'coverage~=4.2', + 'mock~=2.0', +] + +setup(name='garminexport', + version='0.1.0', + description=('Garmin Connect activity exporter and backup tool'), + long_description=long_description, + long_description_content_type='text/markdown', + author='Peter Gardfjäll', + author_email='peter.gardfjall.work@gmail.com', -setup(name="Garmin Connect activity exporter", - version="1.0.0", - description=("A program that downloads all activities for a given Garmin Connect account " - "and stores them locally on the user's computer."), - long_description=open('README.md').read(), - author="Peter Gardfjäll", - author_email="peter.gardfjall.work@gmail.com", - install_requires=open('requirements.txt').read(), - license=open('LICENSE').read(), - url="https://github.com/petergardfjall/garminexport", - packages=["garminexport"], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', - 'Intended Audience :: End Users/Desktop' + 'Intended Audience :: End Users/Desktop', + 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.5+', - ]) + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + ], + keywords='garmin export backup', + url='https://github.com/petergardfjall/garminexport', + license='Apache License 2.0', + + project_urls={ + 'Source': 'https://github.com/petergardfjall/garminexport.git', + 'Tracker': 'https://github.com/petergardfjall/garminexport/issues', + }, + + packages=[ + 'garminexport', + 'garminexport.cli', + ], + + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4', + install_requires=requires, + test_requires=test_requires, + entry_points={ + 'console_scripts': [ + 'garmin-backup = garminexport.cli.backup:main', + 'garmin-get-activity = garminexport.cli.get_activity:main', + 'garmin-upload-activity = garminexport.cli.upload_activity:main', + ], + }, +)