From 067624b5e48ae03a83e4d45e318a31887de7f1ab Mon Sep 17 00:00:00 2001 From: Louis-Philippe Huberdeau Date: Fri, 20 Apr 2018 10:54:06 -0400 Subject: [PATCH] Completing the setup.py --- .gitignore | 4 ++++ openwebvulndb/__version__.py | 18 ++++++++++++++++++ setup.py | 25 ++++++++++++++++++------- 3 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 openwebvulndb/__version__.py diff --git a/.gitignore b/.gitignore index 9cc16b6..5c410e5 100755 --- a/.gitignore +++ b/.gitignore @@ -16,10 +16,14 @@ data/ bin/ include/ lib/ +lib64 man/ share/ pip-selfcheck.json dist/ +openwebvulndb_tools.egg-info/ +pyvenv.cfg + # cookies cookies* diff --git a/openwebvulndb/__version__.py b/openwebvulndb/__version__.py new file mode 100644 index 0000000..4c163fe --- /dev/null +++ b/openwebvulndb/__version__.py @@ -0,0 +1,18 @@ +# openwebvulndb-tools: A collection of tools to maintain vulnerability databases +# Copyright (C) 2016- Delve Labs inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +__version__ = "1.0.0" diff --git a/setup.py b/setup.py index 11862ff..5f9d3dc 100755 --- a/setup.py +++ b/setup.py @@ -1,16 +1,27 @@ #!/usr/bin/env python +try: # for pip >= 10 + from pip._internal.req import parse_requirements +except ImportError: # for pip <= 9.0.3 + from pip.req import parse_requirements from setuptools import setup + +version_file = "openwebvulndb/__version__.py" +version_data = {} +with open(version_file) as f: + code = compile(f.read(), version_file, 'exec') + exec(code, globals(), version_data) + +reqs = [str(x.req) for x in parse_requirements('./requirements.txt', session=False)] + + setup(name='openwebvulndb-tools', + version=version_data['__version__'], description='A collection of tools to maintain vulnerability databases.', author='Delve Labs inc.', author_email='info@delvelabs.ca', + url='https://github.com/delvelabs/openwebvulndb-tools', packages=['openwebvulndb.common', 'openwebvulndb.wordpress'], - install_requires=[ - 'aiohttp', - 'marshmallow', - 'easyinject', - 'packaging', - 'lxml' - ]) + license="GPLv2", + install_requires=reqs)