[Mageia-dev] Python Packaging Policy

philippe makowski makowski.mageia at gmail.com
Thu Jan 20 19:11:01 CET 2011


about http://wiki.mandriva.com/en/Python_packaging_policy
and pyc/pyo policy and the problem of bigger packages

I made a test that seems not bad with :

%python_compile_opt
%python_compile
install *.pyc *.pyo %{buildroot}%{py_platsitedir}/%{name}
%fdupes %{buildroot}%{py_platsitedir}/%{name}


with
%define fdupes(s) \
 _target=""; \
 _symlinks=0; \
 %{-s:_symlinks=1;} \
 fdupes -q -n -r %1 | \
  while read _file; do \
    if test -z "$_target" ; then \
      _target="$_file"; \
    else \
      if test -z "$_file" ; then \
        _target=""; \
        continue ; \
      fi ; \
      if test "$_symlinks" = 1; then \
        ln -sf "${_target#%{buildroot}}" "$_file"; \
      else \
        ln -f "$_target" "$_file"; \
      fi ;\
    fi ; \
 done \
%{nil}

in fact as said in this bugzilla entry under Fedora
(https://bugzilla.redhat.com/show_bug.cgi?id=617039),
 %fdupes can be usefull not only for Python


More information about the Mageia-dev mailing list