forked from pool/python-oci-sdk
Accepting request 1088042 from home:bnavigator:branches:devel:languages:python
- Provide the PyPI name: python-oci - Use pep517 macros instead of deprecated direct setup.py calls - Update deps patch - Add rpmlintrc for devendored package requirements OBS-URL: https://build.opensuse.org/request/show/1088042 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-oci-sdk?expand=0&rev=97
This commit is contained in:
parent
6b1101d4b1
commit
abc9ea1d58
@ -1,6 +1,7 @@
|
|||||||
diff -Nru oci-python-sdk-2.17.2.orig/tests/unit/test_basic_api_calls.py oci-python-sdk-2.17.2/tests/unit/test_basic_api_calls.py
|
Index: oci-python-sdk-2.102.0/tests/unit/test_basic_api_calls.py
|
||||||
--- oci-python-sdk-2.17.2.orig/tests/unit/test_basic_api_calls.py 2020-07-07 23:40:28.000000000 +0200
|
===================================================================
|
||||||
+++ oci-python-sdk-2.17.2/tests/unit/test_basic_api_calls.py 2020-07-14 11:04:06.710713773 +0200
|
--- oci-python-sdk-2.102.0.orig/tests/unit/test_basic_api_calls.py
|
||||||
|
+++ oci-python-sdk-2.102.0/tests/unit/test_basic_api_calls.py
|
||||||
@@ -5,7 +5,7 @@
|
@@ -5,7 +5,7 @@
|
||||||
import oci
|
import oci
|
||||||
|
|
||||||
@ -10,7 +11,7 @@ diff -Nru oci-python-sdk-2.17.2.orig/tests/unit/test_basic_api_calls.py oci-pyth
|
|||||||
response = identity.list_users(config["tenancy"])
|
response = identity.list_users(config["tenancy"])
|
||||||
|
|
||||||
assert response is not None
|
assert response is not None
|
||||||
@@ -31,7 +31,7 @@
|
@@ -31,7 +31,7 @@ def test_vcn_list_instances(compute, con
|
||||||
assert response.request_id is not None
|
assert response.request_id is not None
|
||||||
|
|
||||||
|
|
||||||
@ -19,10 +20,11 @@ diff -Nru oci-python-sdk-2.17.2.orig/tests/unit/test_basic_api_calls.py oci-pyth
|
|||||||
response = identity.list_users(config["tenancy"], limit=1)
|
response = identity.list_users(config["tenancy"], limit=1)
|
||||||
|
|
||||||
assert response is not None
|
assert response is not None
|
||||||
diff -Nru oci-python-sdk-2.17.2.orig/tests/unit/test_waiters.py oci-python-sdk-2.17.2/tests/unit/test_waiters.py
|
Index: oci-python-sdk-2.102.0/tests/unit/test_waiters.py
|
||||||
--- oci-python-sdk-2.17.2.orig/tests/unit/test_waiters.py 2020-07-07 23:40:28.000000000 +0200
|
===================================================================
|
||||||
+++ oci-python-sdk-2.17.2/tests/unit/test_waiters.py 2020-07-14 11:04:11.938762342 +0200
|
--- oci-python-sdk-2.102.0.orig/tests/unit/test_waiters.py
|
||||||
@@ -109,7 +109,7 @@
|
+++ oci-python-sdk-2.102.0/tests/unit/test_waiters.py
|
||||||
|
@@ -112,7 +112,7 @@ def test_wait_multiple_states(virtual_ne
|
||||||
assert total_time < 60 * 5
|
assert total_time < 60 * 5
|
||||||
|
|
||||||
|
|
||||||
@ -31,7 +33,7 @@ diff -Nru oci-python-sdk-2.17.2.orig/tests/unit/test_waiters.py oci-python-sdk-2
|
|||||||
# Create User
|
# Create User
|
||||||
request = oci.identity.models.CreateUserDetails()
|
request = oci.identity.models.CreateUserDetails()
|
||||||
request.compartment_id = config["tenancy"]
|
request.compartment_id = config["tenancy"]
|
||||||
@@ -132,7 +132,7 @@
|
@@ -135,7 +135,7 @@ def test_invalid_operation(identity, con
|
||||||
oci.wait_until(identity, response, 'not a real property', 'test')
|
oci.wait_until(identity, response, 'not a real property', 'test')
|
||||||
|
|
||||||
|
|
||||||
@ -40,7 +42,7 @@ diff -Nru oci-python-sdk-2.17.2.orig/tests/unit/test_waiters.py oci-python-sdk-2
|
|||||||
description = 'test user'
|
description = 'test user'
|
||||||
request = oci.identity.models.CreateUserDetails()
|
request = oci.identity.models.CreateUserDetails()
|
||||||
request.compartment_id = config["tenancy"]
|
request.compartment_id = config["tenancy"]
|
||||||
@@ -152,7 +152,7 @@
|
@@ -155,7 +155,7 @@ def test_already_in_state(identity, conf
|
||||||
identity.delete_user(user_id)
|
identity.delete_user(user_id)
|
||||||
|
|
||||||
|
|
||||||
@ -49,7 +51,7 @@ diff -Nru oci-python-sdk-2.17.2.orig/tests/unit/test_waiters.py oci-python-sdk-2
|
|||||||
description = 'test user'
|
description = 'test user'
|
||||||
request = oci.identity.models.CreateUserDetails()
|
request = oci.identity.models.CreateUserDetails()
|
||||||
request.compartment_id = config["tenancy"]
|
request.compartment_id = config["tenancy"]
|
||||||
@@ -183,7 +183,7 @@
|
@@ -182,7 +182,7 @@ def test_property_and_eval_function_prov
|
||||||
assert str(ve.value) == 'Invalid wait_until configuration - can not provide both evaluate_response function and property argument, only one should be specified'
|
assert str(ve.value) == 'Invalid wait_until configuration - can not provide both evaluate_response function and property argument, only one should be specified'
|
||||||
|
|
||||||
|
|
||||||
@ -58,7 +60,7 @@ diff -Nru oci-python-sdk-2.17.2.orig/tests/unit/test_waiters.py oci-python-sdk-2
|
|||||||
user_id = None
|
user_id = None
|
||||||
try:
|
try:
|
||||||
description = 'test user'
|
description = 'test user'
|
||||||
@@ -207,7 +207,7 @@
|
@@ -206,7 +206,7 @@ def test_eval_function_lambda(identity,
|
||||||
identity.delete_user(user_id)
|
identity.delete_user(user_id)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,48 +1,8 @@
|
|||||||
diff -Nru oci-python-sdk-2.100.0.orig/requirements.txt oci-python-sdk-2.100.0/requirements.txt
|
Index: oci-python-sdk-2.102.0/setup.py
|
||||||
--- oci-python-sdk-2.100.0.orig/requirements.txt 2023-05-02 19:32:42.000000000 +0200
|
===================================================================
|
||||||
+++ oci-python-sdk-2.100.0/requirements.txt 2023-05-04 14:06:52.419132999 +0200
|
--- oci-python-sdk-2.102.0.orig/setup.py
|
||||||
@@ -1,21 +1,21 @@
|
+++ oci-python-sdk-2.102.0/setup.py
|
||||||
-autodocsumm==0.1.11
|
@@ -31,12 +31,12 @@ with open_relative("README.rst") as f:
|
||||||
+autodocsumm>=0.1.11
|
|
||||||
certifi
|
|
||||||
-coverage==4.5.2
|
|
||||||
-cryptography>=3.2.1,<40.0.0
|
|
||||||
-flake8>=3.6.0,<6
|
|
||||||
-mock==2.0.0
|
|
||||||
-pyOpenSSL>=17.5.0,<24.0.0
|
|
||||||
-pytest==4.1.0
|
|
||||||
-pytest-cov==2.6.1
|
|
||||||
-attrs==19.1.0
|
|
||||||
-python-dateutil>=2.5.3,<=2.7.3
|
|
||||||
+coverage>=4.5.2
|
|
||||||
+cryptography>=3.2.1
|
|
||||||
+flake8>=3.6.0
|
|
||||||
+mock>=2.0.0
|
|
||||||
+pyOpenSSL>=17.5.0
|
|
||||||
+pytest>=4.1.0
|
|
||||||
+pytest-cov>=2.6.1
|
|
||||||
+attrs>=19.1.0
|
|
||||||
+python-dateutil>=2.5.3
|
|
||||||
pytz>=2016.10
|
|
||||||
-sphinx-rtd-theme==0.4.2
|
|
||||||
-sphinx==1.8.3
|
|
||||||
-tox==3.14.3
|
|
||||||
-virtualenv==16.7.9
|
|
||||||
-vcrpy==2.0.1
|
|
||||||
+sphinx-rtd-theme>=0.4.2
|
|
||||||
+sphinx>=1.8.3
|
|
||||||
+tox>=3.14.3
|
|
||||||
+virtualenv>=16.7.9
|
|
||||||
+vcrpy>=2.0.1
|
|
||||||
wheel<=0.39.0
|
|
||||||
-circuitbreaker>=1.3.1,<2.0.0
|
|
||||||
+circuitbreaker>=1.3.1
|
|
||||||
docutils<0.18
|
|
||||||
Jinja2<3.1
|
|
||||||
diff -Nru oci-python-sdk-2.100.0.orig/setup.py oci-python-sdk-2.100.0/setup.py
|
|
||||||
--- oci-python-sdk-2.100.0.orig/setup.py 2023-05-02 19:32:42.000000000 +0200
|
|
||||||
+++ oci-python-sdk-2.100.0/setup.py 2023-05-04 14:07:27.495304762 +0200
|
|
||||||
@@ -31,12 +31,12 @@
|
|
||||||
|
|
||||||
requires = [
|
requires = [
|
||||||
"certifi",
|
"certifi",
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 20 09:34:05 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Provide the PyPI name: python-oci
|
||||||
|
- Use pep517 macros instead of deprecated direct setup.py calls
|
||||||
|
- Update deps patch
|
||||||
|
- Add rpmlintrc for devendored package requirements
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri May 19 12:57:29 UTC 2023 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
Fri May 19 12:57:29 UTC 2023 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
8
python-oci-sdk.rpmlintrc
Normal file
8
python-oci-sdk.rpmlintrc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# devendored packages are extra requirements
|
||||||
|
addFilter("python-leftover-require python[0-9]+-PyJWT")
|
||||||
|
addFilter("python-leftover-require python[0-9]+-httpsig_cffi")
|
||||||
|
addFilter("python-leftover-require python[0-9]+-requests")
|
||||||
|
addFilter("python-leftover-require python[0-9]+-six")
|
||||||
|
addFilter("python-leftover-require python[0-9]+-urllib3")
|
||||||
|
# python2 only: rpmlint does not understand the python marker yet
|
||||||
|
addFilter("python-missing-require configparser")
|
@ -25,34 +25,36 @@ License: Apache-2.0 OR UPL-1.0
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/oracle/oci-python-sdk
|
URL: https://github.com/oracle/oci-python-sdk
|
||||||
Source: %{url}/archive/v%{version}.tar.gz#/oci-python-sdk-%{version}.tar.gz
|
Source: %{url}/archive/v%{version}.tar.gz#/oci-python-sdk-%{version}.tar.gz
|
||||||
|
Source99: python-oci-sdk.rpmlintrc
|
||||||
Patch0: ops_relax-python-depends.patch
|
Patch0: ops_relax-python-depends.patch
|
||||||
Patch1: ops_fixture-order.patch
|
Patch1: ops_fixture-order.patch
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-PyJWT
|
|
||||||
Requires: python-certifi
|
Requires: python-certifi
|
||||||
Requires: python-circuitbreaker >= 1.3.1
|
Requires: python-circuitbreaker >= 1.3.1
|
||||||
Requires: python-cryptography
|
Requires: python-cryptography >= 3.2.1
|
||||||
Requires: python-httpsig_cffi
|
|
||||||
Requires: python-pyOpenSSL >= 17.5.0
|
Requires: python-pyOpenSSL >= 17.5.0
|
||||||
Requires: python-python-dateutil < 3.0.0
|
|
||||||
Requires: python-python-dateutil >= 2.5.3
|
Requires: python-python-dateutil >= 2.5.3
|
||||||
Requires: python-pytz >= 2016.10
|
Requires: python-pytz >= 2016.10
|
||||||
|
# SECTION devendored packages
|
||||||
|
Requires: python-PyJWT
|
||||||
|
Requires: python-httpsig_cffi
|
||||||
Requires: python-requests
|
Requires: python-requests
|
||||||
Requires: python-six
|
Requires: python-six
|
||||||
Requires: python-urllib3 < 2
|
Requires: python-urllib3 < 2
|
||||||
|
# /SECTION
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module PyJWT}
|
BuildRequires: %{python_module PyJWT}
|
||||||
BuildRequires: %{python_module certifi}
|
BuildRequires: %{python_module certifi}
|
||||||
BuildRequires: %{python_module circuitbreaker >= 1.3.1}
|
BuildRequires: %{python_module circuitbreaker >= 1.3.1}
|
||||||
BuildRequires: %{python_module cryptography}
|
BuildRequires: %{python_module cryptography >= 3.2.1}
|
||||||
BuildRequires: %{python_module httpsig_cffi}
|
BuildRequires: %{python_module httpsig_cffi}
|
||||||
BuildRequires: %{python_module pyOpenSSL >= 17.5.0}
|
BuildRequires: %{python_module pyOpenSSL >= 17.5.0}
|
||||||
BuildRequires: %{python_module pytest > 4.1.0}
|
BuildRequires: %{python_module pytest > 4.1.0}
|
||||||
BuildRequires: %{python_module python-dateutil < 3.0.0}
|
|
||||||
BuildRequires: %{python_module python-dateutil >= 2.5.3}
|
BuildRequires: %{python_module python-dateutil >= 2.5.3}
|
||||||
BuildRequires: %{python_module pytz >= 2016.10}
|
BuildRequires: %{python_module pytz >= 2016.10}
|
||||||
BuildRequires: %{python_module requests}
|
BuildRequires: %{python_module requests}
|
||||||
@ -60,12 +62,14 @@ BuildRequires: %{python_module six}
|
|||||||
BuildRequires: %{python_module urllib3 < 2}
|
BuildRequires: %{python_module urllib3 < 2}
|
||||||
BuildRequires: %{python_module vcrpy >= 2.0.1}
|
BuildRequires: %{python_module vcrpy >= 2.0.1}
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
BuildRequires: python-configparser
|
BuildRequires: python-configparser >= 4.0.2
|
||||||
%endif
|
%endif
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%ifpython2
|
%ifpython2
|
||||||
Requires: python-configparser
|
Requires: python-configparser >= 4.0.2
|
||||||
%endif
|
%endif
|
||||||
|
# The PyPI name is just oci
|
||||||
|
Provides: python-oci = %{version}-%{release}
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -85,14 +89,13 @@ sed -i 's/oci\._vendor\.//' src/oci/*.py src/oci/auth/*.py src/oci/auth/signers/
|
|||||||
sed -i 's/from . import vcr_mods//' tests/test_config_container.py
|
sed -i 's/from . import vcr_mods//' tests/test_config_container.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export PYTHONDONTWRITEBYTECODE=1
|
%pytest tests/unit tests/integ -s -rs
|
||||||
%pytest tests/unit tests/integ -s
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
|
Loading…
Reference in New Issue
Block a user