From c9bfa511569fef4fa46b246584db75d9200f0af4879910ab7ac37f258c02c082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 17 May 2018 13:16:52 +0000 Subject: [PATCH] Accepting request 610074 from home:mcepl:work - Initial packaging effort OBS-URL: https://build.opensuse.org/request/show/610074 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-portalocker?expand=0&rev=1 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + portalocker-1.2.1-old-Sphinx.patch | 23 ++++++++++ portalocker-1.2.1.tar.gz | 3 ++ portalocker.changes | 9 ++++ python-portalocker.spec | 67 ++++++++++++++++++++++++++++++ 6 files changed, 126 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 portalocker-1.2.1-old-Sphinx.patch create mode 100644 portalocker-1.2.1.tar.gz create mode 100644 portalocker.changes create mode 100644 python-portalocker.spec 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/portalocker-1.2.1-old-Sphinx.patch b/portalocker-1.2.1-old-Sphinx.patch new file mode 100644 index 0000000..6265def --- /dev/null +++ b/portalocker-1.2.1-old-Sphinx.patch @@ -0,0 +1,23 @@ +--- a/setup.py ++++ b/setup.py +@@ -27,10 +27,7 @@ tests_require = [ + 'flake8>=3.5.0', + 'pytest>=3.4.0', + 'pytest-cache>=1.0', +- 'pytest-cov>=2.5.1', +- 'pytest-flakes>=2.0.0', +- 'pytest-pep8>=1.0.6', +- 'sphinx>=1.7.1', ++ 'sphinx>=1.6.5', + ] + + +@@ -47,7 +44,7 @@ class PyTest(TestCommand): + import pytest + errno = pytest.main(shlex.split(self.pytest_args)) + sys.exit(errno) +- ++ + + class Combine(setuptools.Command): + description = 'Build single combined portalocker file' diff --git a/portalocker-1.2.1.tar.gz b/portalocker-1.2.1.tar.gz new file mode 100644 index 0000000..db940b7 --- /dev/null +++ b/portalocker-1.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f2a56d3d90e2ac5659ee744336e6953c0050bb61fccb97090a03de5c2a4db9f +size 10829 diff --git a/portalocker.changes b/portalocker.changes new file mode 100644 index 0000000..1ce551e --- /dev/null +++ b/portalocker.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Thu May 17 12:40:14 UTC 2018 - mcepl@suse.com + +- Fix specfile name + +------------------------------------------------------------------- +Thu May 17 12:07:31 UTC 2018 - mcepl@suse.com + +- Initial packaging effort diff --git a/python-portalocker.spec b/python-portalocker.spec new file mode 100644 index 0000000..58b2287 --- /dev/null +++ b/python-portalocker.spec @@ -0,0 +1,67 @@ +# +# spec file for package portalocker +# +# Copyright (c) 2018 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 http://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-portalocker +Version: 1.2.1 +Release: 0 +Summary: Cross-platform locking library +License: Python-2.0 +Group: Development/Languages/Python +URL: https://github.com/WoLpH/portalocker +Source: https://files.pythonhosted.org/packages/source/p/portalocker/portalocker-%{version}.tar.gz +Patch0: portalocker-1.2.1-old-Sphinx.patch +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +BuildRequires: %{python_module flake8 >= 3.5.0} +BuildRequires: %{python_module pytest >= 3.4.0} +BuildRequires: %{python_module pytest-cache >= 1.0} +BuildRequires: %{python_module Sphinx >= 1.6.5} + +%python_subpackages + +%description +Portalocker is a library to provide an easy API to file locking. + +An important detail to note is that on Linux and Unix systems the locks are +advisory by default. By specifying the `-o mand` option to the mount command it +is possible to enable mandatory file locking on Linux. This is generally not +recommended however. For more information about the subject: + +%prep +%setup -q -n portalocker-%{version} +%patch0 -p1 + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%python_exec setup.py test + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/* + +%changelog