From 5fb20188188ff33f07073ccde335746046f9b1b0 Mon Sep 17 00:00:00 2001 From: Giovanni Pellerano Date: Tue, 27 Dec 2016 18:05:07 +0100 Subject: [PATCH] Align install_requires in setup.py to GlobaLeaks --- setup.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 5112ed1c..7a4df239 100644 --- a/setup.py +++ b/setup.py @@ -2,15 +2,14 @@ #-*- coding: utf-8 -*- import os +import pip import re from setuptools import find_packages, setup from tor2web import __version__ -def get_requires(): - with open('requirements.txt') as f: - requires = f.readlines() - return requires +install_requires = [str(r.req) for r in pip.req.parse_requirements('requirements.txt', + session=pip.download.PipSession())] setup( name="tor2web", @@ -20,5 +19,5 @@ def get_requires(): url="https://tor2web.org/", packages=find_packages(exclude=['*.tests', '*.tests.*']), scripts=["bin/tor2web"], - install_requires=get_requires() + install_requires=install_requires )