forked from pool/python-pycapnp
Accepting request 882890 from home:jayvdb:py-submit
This is the best https://capnproto.org/ wrapper for Python, most prominently used extensively by comma.ai , https://github.com/search?q=org%3Acommaai+pycapnp&type=code , but also used by other automotive and AI projects. OBS-URL: https://build.opensuse.org/request/show/882890 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycapnp?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
pycapnp-1.0.0.tar.gz
Normal file
3
pycapnp-1.0.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4bc4e948b02c159eb7c268e3179a1b6709351281f4758245d700012e0ff0bc75
|
||||||
|
size 120069
|
4
python-pycapnp.changes
Normal file
4
python-pycapnp.changes
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 10 07:15:37 AM UTC 2021 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
- Initial spec for v1.0.0
|
81
python-pycapnp.spec
Normal file
81
python-pycapnp.spec
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-pycapnp
|
||||||
|
#
|
||||||
|
# Copyright (c) 2021 SUSE LLC
|
||||||
|
#
|
||||||
|
# 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-%{**}}
|
||||||
|
%define skip_python2 1
|
||||||
|
Name: python-pycapnp
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 0
|
||||||
|
Summary: Cython wrapping of the C++ Cap'n Proto library
|
||||||
|
License: BSD-2-Clause
|
||||||
|
URL: https://github.com/capnproto/pycapnp
|
||||||
|
Source: https://github.com/capnproto/pycapnp/archive/refs/tags/v%{version}.tar.gz#/pycapnp-%{version}.tar.gz
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildRequires: %{python_module Cython}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module pkgconfig}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module Jinja2}
|
||||||
|
BuildRequires: pkgconfig(capnp)
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
A cython wrapping of the C++ Cap'n Proto library.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n pycapnp-%{version}
|
||||||
|
sed -i '1{/^#!/d}' capnp/templates/setup.py.tmpl
|
||||||
|
|
||||||
|
%build
|
||||||
|
export CFLAGS="%{optflags}"
|
||||||
|
%python_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%python_install
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/capnpc-cython
|
||||||
|
%{python_expand rm %{buildroot}%{$python_sitearch}/capnp/helpers/*.h
|
||||||
|
%fdupes %{buildroot}%{$python_sitearch}
|
||||||
|
}
|
||||||
|
%python_expand find %{buildroot}%{$python_sitearch}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
||||||
|
mv capnp/ /tmp
|
||||||
|
if [[ "$python" == "python3" || "$python" == "python3.6" ]]; then
|
||||||
|
$python -m pytest -k 'not async'
|
||||||
|
else
|
||||||
|
$python -m pytest
|
||||||
|
fi
|
||||||
|
mv /tmp/capnp/ .
|
||||||
|
}
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative capnpc-cython
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative capnpc-cython
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%doc CHANGELOG.md README.md
|
||||||
|
%license LICENSE.md
|
||||||
|
%python_alternative %{_bindir}/capnpc-cython
|
||||||
|
%{python_sitearch}/*
|
||||||
|
|
||||||
|
%changelog
|
Reference in New Issue
Block a user