14
0
forked from pool/python-zstd

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
This commit is contained in:
Tomáš Chvátal
2019-03-04 13:22:25 +00:00
committed by Git OBS Bridge
commit 0e518d7c48
8 changed files with 142 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -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

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

24
LICENSE Normal file
View File

@@ -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.

6
python-zstd.changes Normal file
View File

@@ -0,0 +1,6 @@
-------------------------------------------------------------------
Mon Mar 4 10:10:45 AM UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- 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.

64
python-zstd.spec Normal file
View File

@@ -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

11
test-external.patch Normal file
View File

@@ -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:

10
test-once.patch Normal file
View File

@@ -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',

3
zstd-1.3.8.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d89e884da59c35e480439f1663cb3cb4cf372e42ba0eb0bdf22b9625414702a3
size 443573