From b7d0ed61897bfff5230e1d515e9f2c78ac960c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Codet?= Date: Thu, 24 Aug 2017 14:21:06 +0200 Subject: [PATCH] Fix setup: don't use requirements.txt Installing nece in a project results with the following error: >>> FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt' Instead of setup.py relying on requiremnts.txt, the opposite should be done. See https://caremad.io/posts/2013/07/setup-vs-requirement/ --- requirements.txt | 3 +-- setup.py | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7a576bf..d6e1198 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ -Django>=1.9 -psycopg2>=2.5.4 +-e . diff --git a/setup.py b/setup.py index 3eb5840..d2a851e 100644 --- a/setup.py +++ b/setup.py @@ -12,9 +12,6 @@ url = 'https://github.com/tatterdemalion/django-nece' download_url = '/'.join([url, 'tarball', version]) -with open('requirements.txt') as f: - install_requires = f.read().splitlines() - setup( name='nece', version=version, @@ -26,7 +23,10 @@ download_url=download_url, keywords=['translations', 'i18n', 'language', 'multilingual'], packages=['nece'], - install_requires=install_requires, + install_requires=[ + 'Django>=1.9', + 'psycopg2>=2.5.4', + ], license='BSD License', classifiers=[ "Framework :: Django",