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.3.0.
  • Loading branch information
Pierre-Sassoulas committed Sep 22, 2018
1 parent 264d803 commit 7bcc4ab
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 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
47 changes: 27 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,48 @@

import os
import sys
from os import path

from setuptools import find_packages, setup

ROOT = os.path.abspath(os.path.dirname(__file__))
import setuptools

if sys.version_info < (3, 0):
sys.exit('Sorry, Python < 3.0 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.3.0",
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.",
long_description=open(os.path.join(ROOT, 'readme.md')).read(),
version="1.3.1",
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 @@ -44,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 7bcc4ab

Please sign in to comment.