Skip to content

Commit

Permalink
Fix - Add readme and requirements in Manifest.in
Browse files Browse the repository at this point in the history
The package was not installable after the change for 1.2.2.
  • Loading branch information
Pierre-Sassoulas committed Sep 22, 2018
1 parent 1d60eb1 commit 9f186cd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
recursive-include survey *
include readme.md
include requirements*txt
48 changes: 29 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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="[email protected]",
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",
Expand All @@ -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,
)

0 comments on commit 9f186cd

Please sign in to comment.