[packages/python-aws_xray_sdk] - new - added future patch not to require future module under python3
qboosh
qboosh at pld-linux.org
Tue Feb 16 18:48:07 CET 2021
commit e5698d5e5cdee60a75511b09a3ec82e13c416084
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Feb 16 18:48:28 2021 +0100
- new
- added future patch not to require future module under python3
python-aws_xray_sdk-future.patch | 44 +++++++++++++++
python-aws_xray_sdk.spec | 112 +++++++++++++++++++++++++++++++++++++++
2 files changed, 156 insertions(+)
---
diff --git a/python-aws_xray_sdk.spec b/python-aws_xray_sdk.spec
new file mode 100644
index 0000000..28340a9
--- /dev/null
+++ b/python-aws_xray_sdk.spec
@@ -0,0 +1,112 @@
+#
+# Conditional build:
+%bcond_with tests # unit tests (not included in sdist)
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+Summary: AWS X-Ray SDK for Python 2
+Summary(pl.UTF-8): SDK AWS X-Ray dla Pythona 2
+Name: python-aws_xray_sdk
+Version: 2.6.0
+Release: 1
+License: Apache v2.0
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/aws-xray-sdk/
+Source0: https://files.pythonhosted.org/packages/source/a/aws-xray-sdk/aws-xray-sdk-%{version}.tar.gz
+# Source0-md5: 0dde2a6df0c1ce452d6fff5ea485a376
+Patch0: %{name}-future.patch
+URL: https://pypi.org/project/aws-xray-sdk/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-botocore >= 1.11.3
+BuildRequires: python-enum34
+BuildRequires: python-future
+BuildRequires: python-jsonpickle
+BuildRequires: python-wrapt
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.4
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-botocore >= 1.11.3
+BuildRequires: python3-jsonpickle
+BuildRequires: python3-wrapt
+%endif
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires: python-modules >= 1:2.7
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The AWS X-Ray SDK for Python enables Python developers to record and
+emit information from within their applications to the AWS X-Ray
+service.
+
+%description -l pl.UTF-8
+AWS X-Ray SDK dla Pythona pozwala programistom Pythona zapisywać i
+emitować z aplikacji informacje do usługi AWS X-Ray.
+
+%package -n python3-aws_xray_sdk
+Summary: AWS X-Ray SDK for Python 3
+Summary(pl.UTF-8): SDK AWS X-Ray dla Pythona 3
+Group: Libraries/Python
+Requires: python3-modules >= 1:3.4
+
+%description -n python3-aws_xray_sdk
+The AWS X-Ray SDK for Python enables Python developers to record and
+emit information from within their applications to the AWS X-Ray
+service.
+
+%description -n python3-aws_xray_sdk -l pl.UTF-8
+AWS X-Ray SDK dla Pythona pozwala programistom Pythona zapisywać i
+emitować z aplikacji informacje do usługi AWS X-Ray.
+
+%prep
+%setup -q -n aws-xray-sdk-%{version}
+%patch0 -p1
+
+%build
+%if %{with python2}
+%py_build
+%endif
+
+%if %{with python3}
+%py3_build
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc README.md
+%{py_sitescriptdir}/aws_xray_sdk
+%{py_sitescriptdir}/aws_xray_sdk-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-aws_xray_sdk
+%defattr(644,root,root,755)
+%doc README.md
+%{py3_sitescriptdir}/aws_xray_sdk
+%{py3_sitescriptdir}/aws_xray_sdk-%{version}-py*.egg-info
+%endif
diff --git a/python-aws_xray_sdk-future.patch b/python-aws_xray_sdk-future.patch
new file mode 100644
index 0000000..e6837bb
--- /dev/null
+++ b/python-aws_xray_sdk-future.patch
@@ -0,0 +1,44 @@
+--- aws-xray-sdk-2.6.0/setup.py.orig 2020-06-05 16:07:23.000000000 +0200
++++ aws-xray-sdk-2.6.0/setup.py 2021-02-16 18:39:10.099640176 +0100
+@@ -47,7 +47,7 @@
+ 'jsonpickle',
+ 'enum34;python_version<"3.4"',
+ 'wrapt',
+- 'future',
++ 'future;python_version<"3.4"',
+ 'botocore>=1.11.3',
+ ],
+
+--- aws-xray-sdk-2.6.0/aws_xray_sdk/core/plugins/ec2_plugin.py.orig 2020-06-05 16:07:23.000000000 +0200
++++ aws-xray-sdk-2.6.0/aws_xray_sdk/core/plugins/ec2_plugin.py 2021-02-16 18:39:50.929418982 +0100
+@@ -1,9 +1,11 @@
+ import json
+ import logging
+-from future.standard_library import install_aliases
++import sys
+ from urllib.request import urlopen, Request
+
+-install_aliases()
++if sys.version_info < (3, 4):
++ from future.standard_library import install_aliases
++ install_aliases()
+
+ log = logging.getLogger(__name__)
+
+--- aws-xray-sdk-2.6.0/aws_xray_sdk/ext/sqlalchemy/util/decorators.py.orig 2020-06-05 16:07:23.000000000 +0200
++++ aws-xray-sdk-2.6.0/aws_xray_sdk/ext/sqlalchemy/util/decorators.py 2021-02-16 18:40:42.962470428 +0100
+@@ -1,8 +1,12 @@
+ import re
++import sys
+ from aws_xray_sdk.core import xray_recorder
+ from aws_xray_sdk.ext.util import strip_url
+-from future.standard_library import install_aliases
+-install_aliases()
++
++if sys.version_info < (3, 4):
++ from future.standard_library import install_aliases
++ install_aliases()
++
+ from urllib.parse import urlparse, uses_netloc
+ from sqlalchemy.engine.base import Connection
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-aws_xray_sdk.git/commitdiff/e5698d5e5cdee60a75511b09a3ec82e13c416084
More information about the pld-cvs-commit
mailing list