diff --git a/MANIFEST.in b/MANIFEST.in index 2f1ad105..8e568c21 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,3 @@ recursive-include survey * +include readme.md +include requirements*txt diff --git a/setup.py b/setup.py index 3a926142..389e9bac 100644 --- a/setup.py +++ b/setup.py @@ -1,32 +1,48 @@ - +from os import path import sys -from setuptools import find_packages, setup +import setuptools if sys.version_info < (2, 6): sys.exit('Sorry, Python < 2.6 is not supported') +description = "A django survey app, based on and compatible with " +"\"django-survey\". You will be able to migrate your data from an ancient " +"version of django-survey, but it has been ported to python 3 and you can " +"export results as CSV or PDF using your native language." + def add_package(package_list, package): package = package.replace("\n", "").split("#")[0] if package: package_list.append(package) -setup( + +this_directory = path.abspath(path.dirname(__file__)) +with open(path.join(this_directory, 'readme.md'), encoding='utf-8') as f: + long_description = f.read() + +with open("requirements.txt", "r") as fh: + require = fh.readlines() +require = [x.strip() for x in require] + +with open("requirements_dev.txt", "r") as fh: + extras_require = fh.readlines() +# Remove the first two line (-r requirements.txt and a blank line) +extras_require = {'dev': [x.strip() for x in extras_require[2:]]} + +setuptools.setup( name="django-survey-and-report", - version="1.2.1", - description="A django survey app, based on and compatible with " - "'django-survey'", - long_description="A django survey app, based on and compatible with \"django-survey\"." -"You will be able to migrate your data from an ancient version of " -"django-survey, but you can use python 3 and export results as " -"CSV or PDF using your native language.", + version="1.2.3", + description=description, + long_description=long_description, + long_description_content_type="text/markdown", author="Pierre SASSOULAS", author_email="pierre.sassoulas@gmail.com", license="AGPL", url="https://github.com/Pierre-Sassoulas/django-survey", - packages=find_packages(), + packages=setuptools.find_packages(), include_package_data=True, classifiers=[ "Development Status :: 5 - Production/Stable", @@ -41,12 +57,6 @@ def add_package(package_list, package): 'Programming Language :: Python :: 3', "Framework :: Django", ], - install_requires=[ - "Django", "django-bootstrap-form", "django-tastypie", - "django-registration", "pytz", "future", "ordereddict", "PyYAML", - "matplotlib", "seaborn", "numpy" - ], - extras_require={ - 'dev': ["django-rosetta", "pylint", "coverage", "mock"], - }, + install_requires=require, + extras_require=extras_require, )