Changeset 77deb22e


Ignore:
Timestamp:
05/21/2019 04:19:04 PM (3 years ago)
Author:
Pierre Labastie <pieere@…>
Branches:
10.0, 10.1, 11.0, 9.0, 9.1, ken/refactor-virt, lazarus, qt5new, trunk, upgradedb, xry111/git-date, xry111/git-date-for-trunk, xry111/git-date-test
Children:
e399c12
Parents:
a42c273
Message:

Group non-root commands with non-root commands and root commands with root
commands in python modules. Also always use python2 where python could be
enough: this may help when we decide that python is a symlink to python3.7.
Note that a lot of modules could be made P3 only for the book, but let'
keep that for later...

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@21614 af4574ff-66df-0310-9fd7-8a98e5e911e0

Location:
general/prog
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • general/prog/dbus-python.xml

    ra42c273 r77deb22e  
    118118<screen><userinput>mkdir python2 &amp;&amp;
    119119pushd python2 &amp;&amp;
    120 PYTHON=/usr/bin/python     \
     120PYTHON=/usr/bin/python2     \
    121121../configure --prefix=/usr --docdir=/usr/share/doc/dbus-python-&dbus-python-version; &amp;&amp;
    122122make &amp;&amp;
  • general/prog/jinja2.xml

    ra42c273 r77deb22e  
    9797      </para>
    9898
    99 <screen role="root"><userinput>python setup.py install --optimize=1</userinput></screen>
     99<screen role="root"><userinput>python2 setup.py install --optimize=1</userinput></screen>
    100100
    101101      <para>
  • general/prog/libxml2py2.xml

    ra42c273 r77deb22e  
    9999
    100100<screen><userinput>cd python             &amp;&amp;
    101 python setup.py build</userinput></screen>
     101python2 setup.py build</userinput></screen>
    102102
    103103      <para>
     
    107107      </para>
    108108
    109 <screen role="root"><userinput>python setup.py install --optimize=1</userinput></screen>
     109<screen role="root"><userinput>python2 setup.py install --optimize=1</userinput></screen>
    110110
    111111    </sect3>
  • general/prog/lxml.xml

    ra42c273 r77deb22e  
    105105
    106106      <para>
    107         To build the <application>Python 2</application> module, run:
     107        To build both <application>Python 2</application> and
     108        <application>Python 3</application> modules, run:
    108109      </para>
    109110
    110 <screen><userinput>python setup.py build</userinput></screen>
     111<screen><userinput>python2 setup.py build &amp;&amp;
     112python3 setup.py build</userinput></screen>
    111113
    112114     <para>
    113        If you wish to run the tests, enter: <command>make test</command>.
     115       If you wish to run the tests, enter:
     116       <command>make PYTHON=python2 test</command> and
     117       <command>make PYTHON=python3 test</command>.
    114118       This will rebuild the package for inplace use before running the tests.
    115119       One or more tests sometimes fail.
     
    117121
    118122      <para>
    119         To install the <application>Python 2</application> module,
    120         as the
    121         <systemitem class="username">root</systemitem> user run:
     123        To install both modules, issue the following commands as the
     124        <systemitem class="username">root</systemitem> user:
    122125      </para>
    123126
    124 <screen role="root"><userinput>python setup.py install --optimize=1</userinput></screen>
    125 
    126       <para>
    127         To build the <application>Python 3</application> module, run:
    128       </para>
    129 
    130 <screen><userinput>python3 setup.py clean &amp;&amp;
    131 python3 setup.py build</userinput></screen>
    132 
    133      <para>
    134        If you wish to run the tests, enter: <command>make PYTHON=python3
    135        test</command>. This will rebuild the package for inplace use before
    136        running the tests. One or more tests sometimes fail.
    137      </para>
    138 
    139       <para>
    140         To install the <application>Python 3</application> module,
    141         as the
    142         <systemitem class="username">root</systemitem> user run:
    143       </para>
    144 
    145 <screen role="root"><userinput>python3 setup.py install --optimize=1</userinput></screen>
     127<screen role="root"><userinput>python2 setup.py install --optimize=1 &amp;&amp;
     128python3 setup.py install --optimize=1</userinput></screen>
    146129
    147130    </sect3>
  • general/prog/mako.xml

    ra42c273 r77deb22e  
    9999      </para>
    100100
    101 <screen role="root"><userinput>python setup.py install - -optimize=1</userinput></screen>
     101<screen role="root"><userinput>python2 setup.py install - -optimize=1</userinput></screen>
    102102-->
    103103      <para>
  • general/prog/pycairo.xml

    ra42c273 r77deb22e  
    9595
    9696      <para>
    97         Install <application>PyCairo</application> for Python2 by running
    98         the following commands:
     97        Install <application>PyCairo</application> for Python2  and Python3 by
     98        running the following commands:
    9999      </para>
    100100
    101 <screen><userinput>python2 setup.py build</userinput></screen>
     101<screen><userinput>python2 setup.py build &amp;&amp;
     102python3 setup.py build</userinput></screen>
    102103
    103104      <para>
     
    109110      </para>
    110111
    111 <screen role="root"><userinput>python2 setup.py install --optimize=1   &amp;&amp;
     112<screen role="root"><userinput>python2 setup.py install --optimize=1 &amp;&amp;
     113python3 setup.py install --optimize=1</userinput></screen>
     114<!-- Seems that install does the following too
    112115python2 setup.py install_pycairo_header &amp;&amp;
    113 python2 setup.py install_pkgconfig</userinput></screen>
    114 
    115       <para>
    116         Install <application>PyCairo</application> for Python3 by running
    117         the following commands:
    118       </para>
    119 
    120 <screen><userinput>python3 setup.py build</userinput></screen>
    121 
    122       <para>
    123         This package does not come with a test suite.
    124       </para>
    125 
    126       <para>
    127         Now, as the <systemitem class="username">root</systemitem> user:
    128       </para>
    129 
    130 <screen role="root"><userinput>python3 setup.py install --optimize=1   &amp;&amp;
    131 python3 setup.py install_pycairo_header &amp;&amp;
    132 python3 setup.py install_pkgconfig</userinput></screen>
     116python2 setup.py install_pkgconfig</userinput></screen>-->
    133117
    134118    </sect3>
  • general/prog/pycrypto.xml

    ra42c273 r77deb22e  
    9393
    9494      <para>
    95         To build the <application>Python 2</application> module,
    96         run the following command:
     95        To build the <application>Python 2</application> and
     96        <application>Python 3</application> modules, run the following commands:
    9797      </para>
    9898
    99 <screen><userinput>python setup.py build</userinput></screen>
     99<screen><userinput>python2 setup.py build &amp;&amp;
     100python3 setup.py build</userinput></screen>
    100101
    101102      <para>
    102         To install the <application>Python 2</application> module,
    103         run the following command as the
     103        To install both modules, run the following commands as the
    104104        <systemitem class="username">root</systemitem> user:
    105105      </para>
    106106
    107 <screen role="root"><userinput>python setup.py install --optimize=1</userinput></screen>
    108 
    109       <para>
    110         To build the <application>Python 3</application> module,
    111         run the following command:
    112       </para>
    113 
    114 <screen><userinput>python3 setup.py build</userinput></screen>
    115 
    116       <para>
    117         To install the <application>Python 3</application> module,
    118         run the following command as the
    119         <systemitem class="username">root</systemitem> user:
    120       </para>
    121 
    122 <screen role="root"><userinput>python3 setup.py install --optimize=1</userinput></screen>
     107<screen role="root"><userinput>python2 setup.py install --optimize=1 &amp;&amp;
     108python3 setup.py install --optimize=1</userinput></screen>
    123109
    124110    </sect3>
     
    137123          </seg>
    138124          <seg>
    139             pycrypto-&pycrypto-version;-py2.7.egg-info and/or
    140             pycrypto-&pycrypto-version;-py3.6.egg-info
     125            pycrypto-&pycrypto-version;-py&python2-majorver;.egg-info and/or
     126            pycrypto-&pycrypto-version;-py&python3-majorver;.egg-info
    141127          </seg>
    142128          <seg>
  • general/prog/pyyaml.xml

    ra42c273 r77deb22e  
    9797
    9898      <para>
    99         To build the <application>Python 2</application> module,
    100         run the following command:
     99        To build both <application>Python 2</application> and
     100        <application>Python 3</application> modules,
     101        run the following commands:
    101102      </para>
    102103
    103 <screen><userinput>python setup.py build</userinput></screen>
     104<screen><userinput>python2 setup.py build &amp;&amp;
     105python3 setup.py build</userinput></screen>
    104106
    105107      <para>
    106         To install the <application>Python 2</application> module,
    107         run the following command as the
     108        To install both modules, run the following commands as the
    108109        <systemitem class="username">root</systemitem> user:
    109110      </para>
    110111
    111 <screen role="root"><userinput>python setup.py install --optimize=1</userinput></screen>
    112 
    113       <para>
    114         To build the <application>Python 3</application> module,
    115         run the following command:
    116       </para>
    117 
    118 <screen><userinput>python3 setup.py build</userinput></screen>
    119 
    120       <para>
    121         To install the <application>Python 3</application> module,
    122         run the following command as the
    123         <systemitem class="username">root</systemitem> user:
    124       </para>
    125 
    126 <screen role="root"><userinput>python3 setup.py install --optimize=1</userinput></screen>
     112<screen role="root"><userinput>python2 setup.py install --optimize=1 &amp;&amp;
     113python3 setup.py install --optimize=1</userinput></screen>
    127114
    128115    </sect3>
  • general/prog/scour.xml

    ra42c273 r77deb22e  
    107107
    108108      <para>
    109         To build the <application>Python 2</application> module,
    110         run the following command:
     109        To build both <application>Python 2</application> and
     110        <application>Python 3</application> modules,
     111        run the following commands:
    111112      </para>
    112113
    113 <screen><userinput>python setup.py build</userinput></screen>
     114<screen><userinput>python2 setup.py build &amp;&amp;
     115python3 setup.py build</userinput></screen>
    114116
    115117      <para>
    116         To partially test the results, issue: <command>python testcss.py</command>.
     118        To partially test the results, issue: <command>python2 testcss.py</command>.
    117119        If you have installed <application>Six</application> you can run the main
    118         tests by issuing: <command>python testscour.py</command>.
     120        tests by issuing: <command>python2 testscour.py</command>.
    119121      </para>
    120122
    121123      <para>
    122         To install the <application>Python 2</application> module
    123         run the following command as the
     124        To install both modules, run the following command as the
    124125        <systemitem class="username">root</systemitem> user:
    125126      </para>
    126127
    127 <screen role="root"><userinput>python setup.py install --optimize=1</userinput></screen>
    128 
    129       <para>
    130         To build the <application>Python 3</application> module,
    131         run the following command:
    132       </para>
    133 
    134 <screen><userinput>python3 setup.py build</userinput></screen>
    135 
    136       <para>
    137         To install the <application>Python 3</application> module,
    138         run the following command as the
    139         <systemitem class="username">root</systemitem> user:
    140       </para>
    141 
    142 <screen role="root"><userinput>python3 setup.py install --optimize=1</userinput></screen>
     128<screen role="root"><userinput>python2 setup.py install --optimize=1 &amp;&amp;
     129python3 setup.py install --optimize=1</userinput></screen>
    143130
    144131    </sect3>
  • general/prog/six.xml

    ra42c273 r77deb22e  
    9090
    9191      <para>
    92         Install <application>six</application> for Python2 by running
    93         the following commands:
     92        Install <application>six</application> for Python 2 and Python 3
     93        by running the following commands:
    9494      </para>
    9595
    96 <screen><userinput>python2 setup.py build</userinput></screen>
     96<screen><userinput>python2 setup.py build &amp;&amp;
     97python3 setup.py build</userinput></screen>
    9798
    9899      <para>
     
    104105      </para>
    105106
    106 <screen role="root"><userinput>python2 setup.py install --optimize=1</userinput></screen>
    107 
    108       <para>
    109         Install <application>six</application> for Python3 by running
    110         the following commands:
    111       </para>
    112 
    113 <screen><userinput>python3 setup.py build</userinput></screen>
    114 
    115       <para>
    116         This package does not come with a test suite.
    117       </para>
    118 
    119       <para>
    120         Now, as the <systemitem class="username">root</systemitem> user:
    121       </para>
    122 
    123 <screen role="root"><userinput>python3 setup.py install --optimize=1</userinput></screen>
     107<screen role="root"><userinput>python2 setup.py install --optimize=1 &amp;&amp;
     108python3 setup.py install --optimize=1</userinput></screen>
    124109
    125110    </sect3>
Note: See TracChangeset for help on using the changeset viewer.