From 6630151ec6fbae92b0db98ca2165aea91f8194a2 Mon Sep 17 00:00:00 2001 From: CedMrnl Date: Mon, 12 Apr 2021 13:02:54 +0200 Subject: [PATCH] [WP] Edit setup.py to : - Use requirements.txt as install_require - Edit MoSQITo version number - Edit test_require - Add possibility on install packages for testing using python -m pip install "mosqito[testing]" --- setup.py | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/setup.py b/setup.py index 70160cd1..77c6c2b1 100644 --- a/setup.py +++ b/setup.py @@ -1,32 +1,35 @@ import setuptools -import platform +# /!\ update before a release +MoSQITo_VERSION = "0.2.0" + +# MoSQITo description with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() python_requires = ">= 3.5" -# Pyleecan dependancies -install_requires = [ - "setuptools", - "numpy>=1.18.1", - "scipy>=1.4.1", - "matplotlib>=3.1.3", - "pandas", -] +# MoSQITo dependancies +with open("requirements.txt", "r") as file: + requirements = file.readlines() + install_requires = "".join( + requirements + ).splitlines() # remove endline in each element -tests_require = ["pytest>=5.4.1"] +tests_require = ["pytest>=5.4.1","pandas", "openpyxl"] setuptools.setup( name="mosqito", - version="0.1.0", + version=MoSQITo_VERSION, author="MoSQITo Developers", author_email="martin.glesser@eomys.com", description="Modular Sound Quality Integrated Toolbox", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/Eomys/MoSQITo", - download_url="https://github.com/Eomys/MoSQITo/archive/v0.1.0.tar.gz", + download_url="https://github.com/Eomys/MoSQITo/archive/v{}.tar.gz".format( + MoSQITo_VERSION + ), packages=setuptools.find_packages(exclude=["documentation", "tutorials"]), include_package_data=True, classifiers=[ @@ -37,4 +40,7 @@ python_requires=python_requires, install_requires=install_requires, tests_require=tests_require, + extras_require={ + 'testing': tests_require + }, )