Skip to content

Commit

Permalink
Répare le script d'installation du projet
Browse files Browse the repository at this point in the history
  • Loading branch information
Situphen committed Sep 5, 2015
1 parent 27447c0 commit 506e6dc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import os

from pip.download import PipSession
from pip.req import parse_requirements

from setuptools import setup
Expand All @@ -14,8 +15,12 @@

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
pkgs = [str(pkg.req) for pkg in parse_requirements('requirements.txt')]
pkgs = pkgs + ['django-debug-toolbar', 'sqlparse']

session = PipSession()
pkgs = ['django-debug-toolbar', 'sqlparse']
for pkg in parse_requirements('requirements.txt', session=session):
if pkg.req:
pkgs.append(str(pkg.req))

setup(
name='zds',
Expand All @@ -39,5 +44,5 @@
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
install_requires=pkgs,
tests_require=[str(pkg.req) for pkg in parse_requirements('requirements-dev.txt')],
tests_require=[str(pkg.req) for pkg in parse_requirements('requirements-dev.txt', session=session)],
)

0 comments on commit 506e6dc

Please sign in to comment.