Difference between revisions of "Talk:Seafile"

From SME Server
Jump to navigationJump to search
(Created page with "done some work to port all python libraries to sclo of python27 needs now python27-python-versiontools.x86_64 0:1.9.1-5.el6.sme python-seafile.noarch 0:5.1.3-2.el6.sme...")
 
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
needs now
 
needs now
 
   python27-python-versiontools.x86_64 0:1.9.1-5.el6.sme  python-seafile.noarch 0:5.1.3-2.el6.sme                                       
 
   python27-python-versiontools.x86_64 0:1.9.1-5.el6.sme  python-seafile.noarch 0:5.1.3-2.el6.sme                                       
   seafile-server.x86_64 0:5.1.3-2.el6.sme libzdb.x86_64 0:3.1-6.el6.sme        seafile.x86_64 0:5.1.3-2.el6.sme  libsearpc-3.0.7-3.el6.sme.x86_64
+
   seafile-server.x86_64 0:5.1.3-2.el6.sme libzdb.x86_64 0:3.1-6.el6.sme        seafile.x86_64 0:5.1.3-2.el6.sme  python27-libsearpc-3.0.7-4
 +
 
 +
from previous test need to do
 +
unlink /opt/rh/python27/root/usr/lib/python2.7/site-packages/seaserv
 +
unlink /opt/rh/python27/root/usr/lib/python2.7/site-packages/seafile
 +
unlink /opt/rh/python27/root/usr/lib64/python2.7/site-packages/pysearpc
 +
yum install python27-libsearpc
 +
yum remove libsearpc
 +
 
 +
still we have
 +
  ll /usr/lib/python2.6/site-packages/ccnet
 +
this  one needs ccnet, which will need a rebuild
 +
done
 +
unlink /opt/rh/python27/root/usr/lib/python2.7/site-packages/ccnet
 +
yum install python27-python-ccnet --enablerepo=smedev
 +
 
 +
will need to update the requires :
 +
Erreur : Paquet : ccnet-server-5.1.3-5.el6.sme.x86_64 (smedev)
 +
            Requiert : pythonegg(2)(ccnet) = 5.1.3-5.el6.sme
 +
            Installé : python-ccnet-5.1.3-4.el6.sme.noarch (@smedev)
 +
                pythonegg(2)(ccnet) = 5.1.3-4.el6.sme
 +
fixed
 +
 
 +
== build python rpms  ==
 +
 
 +
to build python as rpm when they can not be downloaded with pip without compilation, or simply to build them all
 +
scl enable python27 bash
 +
pip install pyp2rpm
 +
pip install  spec2scl
 +
pyp2rpm django-compressor|spec2scl
 +
 
 +
 
 +
 
 +
<syntaxhighlight lang="spec">
 +
%{?scl:%scl_package python-%{pypi_name}}
 +
%{!?scl:%global pkg_name %{name}}
 +
 
 +
# Created by pyp2rpm-3.3.2
 +
%global pypi_name django-compressor
 +
 
 +
Name:          %{?scl_prefix}python-%{pypi_name}
 +
Version:        2.2
 +
Release:        1%{?dist}
 +
Summary:        Compresses linked and inline JavaScript or CSS into single cached files
 +
 
 +
License:        MIT
 +
URL:            https://django-compressor.readthedocs.io/en/latest/
 +
Source0:        https://files.pythonhosted.org/packages/source/d/%{pypi_name}/django_compressor-%{version}.tar.gz
 +
BuildArch:      noarch
 +
 +
%{?scl:Requires: %{scl}-runtime}
 +
%{?scl:BuildRequires: %{scl}-runtime}
 +
BuildRequires:  %{?scl_prefix}python2-devel
 +
BuildRequires:  %{?scl_prefix}python2dist(django-appconf) >= 1.0
 +
BuildRequires:  %{?scl_prefix}python2dist(rcssmin) = 1.0.6
 +
BuildRequires:  %{?scl_prefix}python2dist(rjsmin) = 1.0.12
 +
BuildRequires:  %{?scl_prefix}python2dist(setuptools)
 +
BuildRequires:  %{?scl_prefix}python2dist(sphinx)
 +
 
 +
 
 +
%description
 +
Django Compressor :target:
 +
 
 +
 
 +
%package -n    %{?scl_prefix}python2-%{pypi_name}
 +
Summary:        %{summary}
 +
%{?python_provide:%python_provide python2-%{pypi_name}}
 +
 +
Requires:      %{?scl_prefix}python2dist(django-appconf) >= 1.0
 +
Requires:      %{?scl_prefix}python2dist(rcssmin) = 1.0.6
 +
Requires:      %{?scl_prefix}python2dist(rjsmin) = 1.0.12
 +
 
 +
%description -n %{?scl_prefix}python2-%{pypi_name}
 +
Django Compressor :target:
 +
 
 +
 
 +
%package -n %{?scl_prefix}python-%{pypi_name}-doc
 +
Summary:        django-compressor documentation
 +
 
 +
%description -n %{?scl_prefix}python-%{pypi_name}-doc
 +
Documentation for django-compressor
 +
 
 +
 
 +
%prep
 +
%{?scl:scl enable %{scl} - << \EOF}
 +
set -ex
 +
%autosetup -n django_compressor-%{version}
 +
# Remove bundled egg-info
 +
rm -rf %{pypi_name}.egg-info
 +
%{?scl:EOF}
 +
 
 +
 
 +
%build
 +
%{?scl:scl enable %{scl} - << \EOF}
 +
set -ex
 +
%py2_build
 +
# generate html docs
 +
PYTHONPATH=${PWD} sphinx-build-2 docs html
 +
# remove the sphinx-build leftovers
 +
rm -rf html/.{doctrees,buildinfo}
 +
%{?scl:EOF}
 +
 
 +
 
 +
%install
 +
%{?scl:scl enable %{scl} - << \EOF}
 +
set -ex
 +
%py2_install
 +
%{?scl:EOF}
 +
 
 +
 
 +
%check
 +
%{?scl:scl enable %{scl} - << \EOF}
 +
set -ex
 +
%{__python2} setup.py test
 +
%{?scl:EOF}
 +
 
 +
 
 +
%files -n %{?scl_prefix}python2-%{pypi_name}
 +
%license LICENSE
 +
%doc README.rst
 +
%{python2_sitelib}/compressor
 +
%{python2_sitelib}/django_compressor-%{version}-py?.?.egg-info
 +
 
 +
 
 +
%files -n %{?scl_prefix}python-%{pypi_name}-doc
 +
%doc html
 +
%license LICENSE
 +
 
 +
 
 +
%changelog
 +
* Mon Mar 26 2018 John Doe <john@doe.com> - 2.2-1
 +
- Initial package.
 +
</syntaxhighlight>

Latest revision as of 07:00, 27 March 2018

done some work to port all python libraries to sclo of python27 needs now

 python27-python-versiontools.x86_64 0:1.9.1-5.el6.sme  python-seafile.noarch 0:5.1.3-2.el6.sme                                       
 seafile-server.x86_64 0:5.1.3-2.el6.sme libzdb.x86_64 0:3.1-6.el6.sme         seafile.x86_64 0:5.1.3-2.el6.sme  python27-libsearpc-3.0.7-4

from previous test need to do

unlink /opt/rh/python27/root/usr/lib/python2.7/site-packages/seaserv
unlink /opt/rh/python27/root/usr/lib/python2.7/site-packages/seafile
unlink /opt/rh/python27/root/usr/lib64/python2.7/site-packages/pysearpc
yum install python27-libsearpc
yum remove libsearpc

still we have

 ll /usr/lib/python2.6/site-packages/ccnet

this one needs ccnet, which will need a rebuild done

unlink /opt/rh/python27/root/usr/lib/python2.7/site-packages/ccnet
yum install python27-python-ccnet --enablerepo=smedev

will need to update the requires : Erreur : Paquet : ccnet-server-5.1.3-5.el6.sme.x86_64 (smedev)

            Requiert : pythonegg(2)(ccnet) = 5.1.3-5.el6.sme
            Installé : python-ccnet-5.1.3-4.el6.sme.noarch (@smedev)
                pythonegg(2)(ccnet) = 5.1.3-4.el6.sme

fixed

build python rpms

to build python as rpm when they can not be downloaded with pip without compilation, or simply to build them all

scl enable python27 bash
pip install pyp2rpm
pip install  spec2scl
pyp2rpm django-compressor|spec2scl


%{?scl:%scl_package python-%{pypi_name}}
%{!?scl:%global pkg_name %{name}}

# Created by pyp2rpm-3.3.2
%global pypi_name django-compressor

Name:           %{?scl_prefix}python-%{pypi_name}
Version:        2.2
Release:        1%{?dist}
Summary:        Compresses linked and inline JavaScript or CSS into single cached files

License:        MIT
URL:            https://django-compressor.readthedocs.io/en/latest/
Source0:        https://files.pythonhosted.org/packages/source/d/%{pypi_name}/django_compressor-%{version}.tar.gz
BuildArch:      noarch
 
%{?scl:Requires: %{scl}-runtime}
%{?scl:BuildRequires: %{scl}-runtime}
BuildRequires:  %{?scl_prefix}python2-devel
BuildRequires:  %{?scl_prefix}python2dist(django-appconf) >= 1.0
BuildRequires:  %{?scl_prefix}python2dist(rcssmin) = 1.0.6
BuildRequires:  %{?scl_prefix}python2dist(rjsmin) = 1.0.12
BuildRequires:  %{?scl_prefix}python2dist(setuptools)
BuildRequires:  %{?scl_prefix}python2dist(sphinx)


%description
Django Compressor :target:


%package -n     %{?scl_prefix}python2-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
 
Requires:       %{?scl_prefix}python2dist(django-appconf) >= 1.0
Requires:       %{?scl_prefix}python2dist(rcssmin) = 1.0.6
Requires:       %{?scl_prefix}python2dist(rjsmin) = 1.0.12

%description -n %{?scl_prefix}python2-%{pypi_name}
Django Compressor :target:


%package -n %{?scl_prefix}python-%{pypi_name}-doc
Summary:        django-compressor documentation

%description -n %{?scl_prefix}python-%{pypi_name}-doc
Documentation for django-compressor


%prep
%{?scl:scl enable %{scl} - << \EOF}
set -ex
%autosetup -n django_compressor-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%{?scl:EOF}


%build
%{?scl:scl enable %{scl} - << \EOF}
set -ex
%py2_build
# generate html docs 
PYTHONPATH=${PWD} sphinx-build-2 docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%{?scl:EOF}


%install
%{?scl:scl enable %{scl} - << \EOF}
set -ex
%py2_install
%{?scl:EOF}


%check
%{?scl:scl enable %{scl} - << \EOF}
set -ex
%{__python2} setup.py test
%{?scl:EOF}


%files -n %{?scl_prefix}python2-%{pypi_name}
%license LICENSE
%doc README.rst
%{python2_sitelib}/compressor
%{python2_sitelib}/django_compressor-%{version}-py?.?.egg-info


%files -n %{?scl_prefix}python-%{pypi_name}-doc
%doc html
%license LICENSE


%changelog
* Mon Mar 26 2018 John Doe <john@doe.com> - 2.2-1
- Initial package.