Changeset 2478


Ignore:
Timestamp:
Feb 24, 2020, 2:10:19 AM (5 weeks ago)
Author:
Bruno Cornec
Message:

Fix python-formats build with the 2 python versions when needed

Location:
projects/python-formats/pbconf
Files:
5 added
4 edited

Legend:

Unmodified
Added
Removed
  • projects/python-formats/pbconf/pbfilter/fedora.yml

    r2407 r2478  
    77# PBGRP is replaced by the RPM group of apps
    88# Cf: http://fedoraproject.org/wiki/RPMGroups
    9 #  filter:
     9  filter:
    1010#    PBGRP: Applications/Archiving
     11#
     12    PBPY2: 1
     13    PBPY3: 1
    1114#
    1215# PBLIC is replaced by the license of the application
     
    1821#
    1922# PBBDEP is replaced by the list of build dependencies
    20 #    PBBDEP:
     23    PBBDEP: python-setuptools,python3-setuptools
    2124#
    2225# PBSUF is replaced by the package suffix ($pb->{'suf'} in code)
  • projects/python-formats/pbconf/pbfilter/pkg.yml

    r2407 r2478  
    66#
    77# Solaris package name (VENDOR : 4 letters in uppercase, SOFT : 8 letters in lowercase)
    8 filter:
    9   PBSOLPKG: SUNWsoftware
     8  filter:
     9    PBSOLPKG: SUNWsoftware
    1010
  • projects/python-formats/pbconf/pbfilter/rpm.yml

    r2407 r2478  
    1313#
    1414# PBDEP is replaced by the list of dependencies
    15     PBDEP:
     15#    PBDEP: !str ""
    1616#
    1717# PBBDEP is replaced by the list of build dependencies
    18     PBBDEP: python-setuptools
     18    PBBDEP: python-setuptools,python3,python3-setuptools
    1919#
    2020# PBSUF is replaced by the package suffix ($pb->{'suf'} in code)
  • projects/python-formats/pbconf/python-formats/rpm/python-formats.spec

    r2407 r2478  
    44# Used if virtual name != real name (perl, ...) - replace PBPKG by PBREALPKG in the line below
    55%define srcname PBPKG
     6%define shortname formats
    67%define py3 PBPY3
     8%define py2 PBPY2
     9%define python3_sitelib  %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
    710
    811Summary:        PBSUMMARY
    912
    10 Name:           PBREALPKG
     13Name:           PBPKG
    1114Version:        PBVER
    1215Release:        PBTAGPBSUF
     
    1720BuildArch:      noarch
    1821#PBPATCHSRC
    19 Requires:       PBDEP
    20 BuildRequires:       PBBDEP
     22
     23%if %py2
     24#Requires:       PBDEP
     25BuildRequires:  PBBDEP
    2126
    2227%description
    2328PBDESC
    2429python2 version
     30%endif
    2531
    2632%if %py3
    27 %package -n python3-PBREALPKG
    28 Summary: %{summary} / Python 3 library
    29 Requires:   python3-PBREALPKG
    30 BuildRequires:   python3-setuptools
     33%if %py2
     34%package -n python3-%{shortname}
     35%endif
     36#Requires:       PBDEP
     37BuildRequires:  PBBDEP
    3138
    32 %description -n python3-PBREALPKG
     39%if %py2
     40Summary:        PBSUMMARY / Python3 version
     41%description -n python3-%{shortname}
     42%else
     43%description
     44%endif
    3345PBDESC
    3446python3 version
     
    3648
    3749%prep
    38 %setup -q -n %{srcname}-%{version}PBEXTDIR
     50%setup -q -n PBPKG-%{version}PBEXTDIR
    3951%if %py3
    4052cd ..
    41 cp -fr %{srcname}-%{version}PBEXTDIR python3
     53cp -fr PBPKG-%{version}PBEXTDIR python3
    4254cd -
    4355%endif
     
    4557
    4658%build
     59%if %py2
    4760%{__python} setup.py build
     61%endif
    4862%if %py3
    4963cd ../python3
    50 %{__python3} setup.py build
     64python3 setup.py build
    5165cd -
    5266%endif
     
    5468%install
    5569%{__rm} -rf %{buildroot}
     70%if %py2
    5671%{__python} setup.py install -O1 --skip-build --root %{buildroot}
     72%endif
    5773%if %py3
    5874cd ../python3
    59 %{__python3} setup.py install -O1 --skip-build --root %{buildroot}
     75python3 setup.py install -O1 --skip-build --root %{buildroot}
    6076cd -
    6177%endif
    6278
     79%if %py2
    6380%files
    6481%doc README.rst
    6582%{python_sitelib}/*
     83%endif
    6684
    6785%if %py3
    68 %files -n python3-PBREALPKG
     86%if %py2
     87%files -n python3-%{shortname}
     88%else
     89%files
     90%endif
    6991%doc README.rst
    7092%{python3_sitelib}/*
     
    7395%changelog
    7496PBLOG
    75 
    76 
Note: See TracChangeset for help on using the changeset viewer.