From 0e518d7c48e9e697c85f34e3b62d58009e0d94c29958d1173e8ccbf2c114ff0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 4 Mar 2019 13:22:25 +0000 Subject: [PATCH] Accepting request 681403 from home:jayvdb:python-imageio - Initial spec for v1.3.8.1, adding test-external.patch to allow tests to run with an external library, and test-once to avoid custom hack to run tests which actually runs them twice. OBS-URL: https://build.opensuse.org/request/show/681403 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zstd?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++++++ .gitignore | 1 + LICENSE | 24 +++++++++++++++++ python-zstd.changes | 6 +++++ python-zstd.spec | 64 +++++++++++++++++++++++++++++++++++++++++++++ test-external.patch | 11 ++++++++ test-once.patch | 10 +++++++ zstd-1.3.8.1.tar.gz | 3 +++ 8 files changed, 142 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 python-zstd.changes create mode 100644 python-zstd.spec create mode 100644 test-external.patch create mode 100644 test-once.patch create mode 100644 zstd-1.3.8.1.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a16bb95 --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2015-2018, Sergey Dryabzhinsky, Anton Stuk +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/python-zstd.changes b/python-zstd.changes new file mode 100644 index 0000000..15f9efa --- /dev/null +++ b/python-zstd.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Mon Mar 4 10:10:45 AM UTC 2019 - John Vandenberg + +- Initial spec for v1.3.8.1, adding test-external.patch to allow + tests to run with an external library, and test-once to avoid + custom hack to run tests which actually runs them twice. diff --git a/python-zstd.spec b/python-zstd.spec new file mode 100644 index 0000000..6124b93 --- /dev/null +++ b/python-zstd.spec @@ -0,0 +1,64 @@ +# +# spec file for package python-zstd +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-zstd +Version: 1.3.8.1 +Release: 0 +Summary: ZSTD Bindings for Python +License: BSD-2-Clause +Group: Development/Languages/Python +URL: https://github.com/sergey-dryabzhinsky/python-zstd +Source: https://files.pythonhosted.org/packages/source/z/zstd/zstd-%{version}.tar.gz +Source1: https://raw.githubusercontent.com/sergey-dryabzhinsky/python-zstd/master/LICENSE +Patch0: test-external.patch +Patch1: test-once.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: libzstd-devel >= 1.3.8 +BuildRequires: fdupes +BuildRequires: python-rpm-macros +%python_subpackages + +%description +ZSTD Bindings for Python. + +%prep +%setup -q -n zstd-%{version} +%patch0 -p1 +%patch1 -p1 +cp %{SOURCE1} . +rm -rf zstd/ + +%build +export CFLAGS="%{optflags}" +%python_build --legacy --pyzstd-legacy --external + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +%python_exec setup.py test + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitearch}/* + +%changelog diff --git a/test-external.patch b/test-external.patch new file mode 100644 index 0000000..3a202d1 --- /dev/null +++ b/test-external.patch @@ -0,0 +1,11 @@ +--- zstd-1.3.8.1/setup.py.orig 2019-03-04 17:40:51.208528890 +0700 ++++ zstd-1.3.8.1/setup.py 2019-03-04 17:58:37.644953996 +0700 +@@ -97,6 +97,8 @@ + class ZstdBuildExt( build_ext ): + + def build_extensions(self): ++ if 'test' in sys.argv: return ++ + c = self.compiler.compiler_type + if c in COPT: + for e in self.extensions: diff --git a/test-once.patch b/test-once.patch new file mode 100644 index 0000000..185380c --- /dev/null +++ b/test-once.patch @@ -0,0 +1,10 @@ +--- zstd-1.3.8.1/setup.py.orig 2019-03-04 17:40:51.208528890 +0700 ++++ zstd-1.3.8.1/setup.py 2019-03-04 17:58:37.644953996 +0700 +@@ -171,7 +173,6 @@ + Extension('zstd', zstdFiles, libraries=ext_libraries) + ], + cmdclass = {'build_ext': ZstdBuildExt }, +- test_suite='setup.my_test_suite', + classifiers=[ + 'License :: OSI Approved :: BSD License', + 'Intended Audience :: Developers', diff --git a/zstd-1.3.8.1.tar.gz b/zstd-1.3.8.1.tar.gz new file mode 100644 index 0000000..305fb53 --- /dev/null +++ b/zstd-1.3.8.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d89e884da59c35e480439f1663cb3cb4cf372e42ba0eb0bdf22b9625414702a3 +size 443573