<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>2196</bug_id>
          
          <creation_ts>2003-02-09 13:12:17 +0300</creation_ts>
          <short_desc>Add %_pythonlibdir macro</short_desc>
          <delta_ts>2006-01-18 16:58:20 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>rpm-build-python</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>4815</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mikhail Zabaluev">mhz</reporter>
          <assigned_to name="Andrey Orlov">cray</assigned_to>
          <cc>cray</cc>
    
    <cc>darktemplar</cc>
    
    <cc>george</cc>
    
    <cc>imz</cc>
    
    <cc>ldv</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1996</commentid>
    <comment_count>0</comment_count>
    <who name="Mikhail Zabaluev">mhz</who>
    <bug_when>2003-02-09 13:12:17 +0300</bug_when>
    <thetext>The definition would be
%_pythonlibdir %(%__python -c \&amp;quot;from distutils import sysconfig; print sysconfig.get_python_lib()\&amp;quot;)

While we are at it, change %__python_version to
%__python_version %(%__python -c \&amp;quot;import sys; print sys.version.split(\&apos; \&apos;)[0]\&amp;quot;)
Don\&apos;t let anyone know that you are more skilled in shell than in Python ;)
---

---

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5154</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2003-02-10 09:17:57 +0300</bug_when>
    <thetext>1. Your version  of %__python_version differs from current one:
$ rpm --eval %__python_version
2.2
$ python -c \&amp;quot;import sys; print sys.version.split(\&apos; \&apos;)[0]\&amp;quot;
2.2.2
I won\&apos;t change behaviour.

2. Who needs this new macro?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8519</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2003-02-10 09:17:57 +0300</bug_when>
    <thetext>1. Your version  of %__python_version differs from current one:
$ rpm --eval %__python_version
2.2
$ python -c \&amp;quot;import sys; print sys.version.split(\&apos; \&apos;)[0]\&amp;quot;
2.2.2
I won\&apos;t change behaviour.

2. Who needs this new macro?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5155</commentid>
    <comment_count>3</comment_count>
    <who name="Mikhail Zabaluev">mhz</who>
    <bug_when>2003-02-11 02:34:56 +0300</bug_when>
    <thetext>Agreed, although it would be better to print out the trimmed value
using only Python, e.g.
%(python -c \&amp;quot;import sys, re; print re.match(\&apos;[0-9]+\\.[0-9]+\&apos;, sys.version.split(\&apos; \&apos;)[0]).group(0)\&amp;quot; 2&amp;gt;/dev/null)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8520</commentid>
    <comment_count>4</comment_count>
    <who name="Mikhail Zabaluev">mhz</who>
    <bug_when>2003-02-11 02:34:56 +0300</bug_when>
    <thetext>Agreed, although it would be better to print out the trimmed value
using only Python, e.g.
%(python -c \&amp;quot;import sys, re; print re.match(\&apos;[0-9]+\\.[0-9]+\&apos;, sys.version.split(\&apos; \&apos;)[0]).group(0)\&amp;quot; 2&amp;gt;/dev/null)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5156</commentid>
    <comment_count>5</comment_count>
    <who name="Mikhail Zabaluev">mhz</who>
    <bug_when>2003-02-13 02:58:37 +0300</bug_when>
    <thetext>The %_pythonlibdir macro is useful for Python modules installed with help of distutils (e.g. pretty much every Python module today). Instead of using
inflexible globs like %_libdir/python*/site-packages/, the exact path
could be determined programmatically.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8521</commentid>
    <comment_count>6</comment_count>
    <who name="Mikhail Zabaluev">mhz</who>
    <bug_when>2003-02-13 02:58:37 +0300</bug_when>
    <thetext>The %_pythonlibdir macro is useful for Python modules installed with help of distutils (e.g. pretty much every Python module today). Instead of using
inflexible globs like %_libdir/python*/site-packages/, the exact path
could be determined programmatically.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13899</commentid>
    <comment_count>7</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2004-05-17 19:05:21 +0400</bug_when>
    <thetext>Andrey?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13913</commentid>
    <comment_count>8</comment_count>
    <who name="Andrey Orlov">cray</who>
    <bug_when>2004-05-18 00:59:21 +0400</bug_when>
    <thetext>Извините за русский, но с моим локализованным английским ваша продвинутая версия 
понимается с трудом, тем не менее: 
 
1. Обратите внимание на то, как %__python_version считается сейчас 
 
__python_version   %(%__python -c &apos;import sys; print &quot;%u.%u&quot; % sys.version_info[0:2]&apos; 
2&gt;/dev/null || echo unknown) 
 
. Это лучше и шелловских скриптов и каких-то регекспов на питоне.  
 
2. Чгря слабо понимаю как стыкуется чисто python&apos;вский distutils с rpm-овскими 
макросами, в любом случае, все модули, использованные во время эксперимента на 
дедали ставились с помощью distutils  и отсутствие такой переменной никому 
не мешало. Подробнее см. python-module-SAMPLE.spec. 
 
3. Если человеку удобен такой макрос - то почему бы не создать, может пригодится 
если ставить __БЕЗ__ distutils, что иногда приходится делать. 
 
 </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15647</commentid>
    <comment_count>9</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2004-06-26 15:38:20 +0400</bug_when>
    <thetext>Немного бюрократии.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15651</commentid>
    <comment_count>10</comment_count>
    <who name="Andrey Orlov">cray</who>
    <bug_when>2004-06-26 16:27:08 +0400</bug_when>
    <thetext>(In reply to comment #9) 
&gt; Немного бюрократии. 
 
Я не против бюрократии, только я не понял, чего предполагается сделать? 
 </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18760</commentid>
    <comment_count>11</comment_count>
    <who name="Andrey Orlov">cray</who>
    <bug_when>2004-09-11 20:27:06 +0400</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 4815 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>