From 39cc9dd82876361b6a95523de7f01523b28cb252 Mon Sep 17 00:00:00 2001 From: Ashutosh Kumar Date: Thu, 20 Apr 2023 12:21:34 +0000 Subject: [PATCH] v0.2.23 --- do.py | 8 ++++++-- openapiart/requirements.py | 4 +--- test_requirements.txt => openapiart/test_requirements.txt | 0 setup.py | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) rename test_requirements.txt => openapiart/test_requirements.txt (100%) diff --git a/do.py b/do.py index 74426a41..ba0b053a 100644 --- a/do.py +++ b/do.py @@ -143,18 +143,22 @@ def init(use_sdk=None): base_dir = os.path.dirname(os.path.abspath(__file__)) if use_sdk is None: req = os.path.join(base_dir, "openapiart", "requirements.txt") + test_req = os.path.join( + base_dir, "openapiart", "test_requirements.txt" + ) run( [ py() + " -m pip install -r {}".format(req), - py() + " -m pip install -r test_requirements.txt", + py() + " -m pip install -r {}".format(test_req), ] ) else: art_path = os.path.join(base_dir, "art", "requirements.txt") + art_test = os.path.join(base_dir, "art", "test_requirements.txt") run( [ py() + " -m pip install -r {}".format(art_path), - py() + " -m pip install -r test_requirements.txt", + py() + " -m pip install -r {}".format(art_test), ] ) diff --git a/openapiart/requirements.py b/openapiart/requirements.py index ac7e7022..22cd9a3d 100644 --- a/openapiart/requirements.py +++ b/openapiart/requirements.py @@ -37,9 +37,7 @@ def generate_requirements(path, file_name=None): new_pkgs = fh.read().splitlines() new_pkgs = list(set(new_pkgs) - set(not_required_pkgs)) - with open( - os.path.join(os.path.dirname(base_dir), "test_requirements.txt"), "r" - ) as fh: + with open(os.path.join(base_dir, "test_requirements.txt"), "r") as fh: test_pkgs = fh.read().splitlines() test_pkgs = list(set(test_pkgs) - set(not_required_pkgs)) diff --git a/test_requirements.txt b/openapiart/test_requirements.txt similarity index 100% rename from test_requirements.txt rename to openapiart/test_requirements.txt diff --git a/setup.py b/setup.py index a622752d..c3e75991 100644 --- a/setup.py +++ b/setup.py @@ -5,14 +5,14 @@ import setuptools pkg_name = "openapiart" -version = "0.2.22" +version = "0.2.23" base_dir = os.path.dirname(os.path.abspath(__file__)) with open(os.path.join(base_dir, "README.md")) as fid: long_description = fid.read() requirements_path = os.path.join(base_dir, "openapiart", "requirements.txt") -test_req_path = os.path.join(base_dir, "test_requirements.txt") +test_req_path = os.path.join(base_dir, "openapiart", "test_requirements.txt") installation_requires = [] test_requires = [] if os.path.exists(requirements_path) is False: @@ -22,7 +22,7 @@ if "--prefer-binary" in installation_requires: installation_requires.remove("--prefer-binary") if os.path.exists(test_req_path): - with open("test_requirements.txt") as f: + with open(test_req_path) as f: test_requires = f.read().splitlines() setuptools.setup(