Skip to content

Commit

Permalink
#1789: packaging for pyu2f
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@18802 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 23, 2018
1 parent 03a788b commit 8e921f9
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 0 deletions.
29 changes: 29 additions & 0 deletions osx/jhbuild/xpra-python.modules
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,34 @@
</after>
</distutils>

<distutils id="python-future">
<branch repo="pypi.python.org"
module="/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz"
hash="sha256:e39ced1ab767b5936646cedba8bcce582398233d6a627067d4c6a454c90cfedb"
version="0.16.0">
</branch>
<dependencies>
<dep package="python"/>
</dependencies>
<after>
<dep package="python"/>
</after>
</distutils>

<distutils id="python-u2f">
<branch repo="pypi.python.org"
module="/packages/5e/84/12044502227f40ed51e40997bf1a86e07504a0cf0fcc3bdefccc78ce93aa/pyu2f-0.1.2.tar.gz"
hash="sha256:fa94083c695a4b52baf55d81894b2cb748fe16f2dd087df86341925c71871cd2"
version="0.1.2">
</branch>
<dependencies>
<dep package="python-future"/>
</dependencies>
<after>
<dep package="python-future"/>
</after>
</distutils>

<distutils id="python-kerberos">
<branch repo="pypi.python.org"
module="/packages/34/18/9c86fdfdb27e0f7437b7d5a9e22975dcc382637b2a68baac07843be512fc/kerberos-1.3.0.tar.gz"
Expand Down Expand Up @@ -647,6 +675,7 @@
<dep package="python-deprecation"/>
<dep package="python-lz4"/>
<dep package="python-lzo"/>
<dep package="python-u2f"/>
<dep package="python-kerberos"/>
<dep package="python-gssapi"/>
<dep package="python-ipaddress"/>
Expand Down
31 changes: 31 additions & 0 deletions osx/jhbuild/xpra-python3.modules
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,34 @@
</after>
</distutils>

<distutils id="python3-future">
<branch repo="pypi.python.org"
module="/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-0.16.0.tar.gz"
hash="sha256:e39ced1ab767b5936646cedba8bcce582398233d6a627067d4c6a454c90cfedb"
version="0.16.0">
</branch>
<dependencies>
<dep package="python3"/>
</dependencies>
<after>
<dep package="python"/>
</after>
</distutils>

<distutils id="python3-u2f">
<branch repo="pypi.python.org"
module="/packages/5e/84/12044502227f40ed51e40997bf1a86e07504a0cf0fcc3bdefccc78ce93aa/pyu2f-0.1.2.tar.gz"
hash="sha256:fa94083c695a4b52baf55d81894b2cb748fe16f2dd087df86341925c71871cd2"
version="0.1.2">
</branch>
<dependencies>
<dep package="python3-future"/>
</dependencies>
<after>
<dep package="python3-future"/>
</after>
</distutils>

<distutils id="python3-kerberos">
<branch repo="pypi.python.org"
module="/packages/34/18/9c86fdfdb27e0f7437b7d5a9e22975dcc382637b2a68baac07843be512fc/kerberos-1.3.0.tar.gz"
Expand Down Expand Up @@ -649,6 +677,9 @@
<dep package="python3-deprecation"/>
<dep package="python3-lz4"/>
<dep package="python3-lzo"/>
<dep package="python3-u2f"/>
<dep package="python3-kerberos"/>
<dep package="python3-gssapi"/>
<dep package="python3-ipaddress"/>
<dep package="python3-idna"/>
<dep package="python3-cryptography"/>
Expand Down
76 changes: 76 additions & 0 deletions rpmbuild/python-pyu2f.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# This file is part of Xpra.
# Copyright (C) 2018 Antoine Martin <[email protected]>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

%{!?__python2: %global __python2 python2}
%{!?__python3: %define __python3 python3}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?python3_sitearch: %global python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

#this is a pure python package so debug is meaningless here:
%define debug_package %{nil}

Name: python2-pyu2f
Version: 0.1.2
Release: 1
URL: https://github.com/google/pyu2f
Summary: Python based U2F host library for Linux
License: BSD
Group: Development/Libraries/Python
Source: https://pypi.python.org/packages/5e/84/12044502227f40ed51e40997bf1a86e07504a0cf0fcc3bdefccc78ce93aa/pyu2f-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: python-pynvml

%description
pyu2f provides functionality for interacting with a U2F device over USB.

%if 0%{?fedora}
%package -n python3-pyu2f
Summary: Python3 based U2F host library for Linux
License: BSD
Group: Development/Libraries/Python

%description -n python3-pyu2f
pyu2f provides functionality for interacting with a U2F device over USB.
%endif

%prep
%setup -q -n pyu2f-0.1.2

%build
%{__python2} ./setup.py build
%if 0%{?fedora}
rm -fr %{py3dir}
cp -r . %{py3dir}
pushd %{py3dir}
%{__python3} ./setup.py build
popd
%endif

%install
%{__python2} ./setup.py install --prefix=%{_prefix} --root=%{buildroot}
%if 0%{?fedora}
pushd %{py3dir}
%{__python3} ./setup.py install --prefix=%{_prefix} --root=%{buildroot}
popd
%endif

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%{python2_sitelib}/pyu2f/*
%{python2_sitelib}/pyu2f-%{version}-py2*.egg-info/*

%if 0%{?fedora}
%files -n python3-pyu2f
%defattr(-,root,root)
%{python3_sitelib}/pyu2f/*
%{python3_sitelib}/pyu2f-%{version}-py3*.egg-info/*
%endif

%changelog
* Sat Mar 24 2018 Antoine Martin <[email protected]> - 0.1.2
- initial packaging for xpra

0 comments on commit 8e921f9

Please sign in to comment.