ReleaseEngineering/PuppetAgain/Python: Difference between revisions
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
: puppet:///python/packages | : puppet:///python/packages | ||
in file resources. | in file resources. | ||
= Adding files = | |||
In general, you do not need to manual add files to the Python data directories. The Distingished Puppet Master will automatically walk through the Puppet Manifests and download any missing Python packages defined in a requirements file. | |||
If you are deploying a package that is _not_ hosted on Pypi (for example, a scriptworker package) you must add it to the Python package directory manually, and you should mark it as [https://github.com/mozilla/build-puppet/blob/master/modules/aws_manager/files/requirements.txt#L9 "# puppet: nodownload" in the requirements file]. | |||
= Mirror Access = | = Mirror Access = | ||
Line 21: | Line 26: | ||
== virtualenv.py == | == virtualenv.py == | ||
An un-packaged copy of virtualenv.py is at python/packages/virtualenv.py. | An un-packaged copy of virtualenv.py is at python/packages/virtualenv.py. More recently, updated versions of virtualenv have been unpacked to "virtualenv-$version" directories in both python/packages and python/packages-3.x. These are all used to bootstrap new virtualenvs. | ||
== Twisted == | == Twisted == | ||
Some virtualenvs need to be installed on systems without compilers. In particular, Talos systems don't have compilers or development libraries installed. For these cases, we install packages that can fall back to a pure-python implementation when the compile fails. The tarball of Twisted-10.2.0 is *not* the one from pypi; that tarball was unpacked, ''conditionalExtensions'' was set to ''[]'' in both ''setup.py'' and ''twisted/topfiles/setup.py'', and a new tarball made with ''setup.py sdist'', and the result is in the python-packages directory. Newer Twisteds may not need this treatment -- who knows. | Some virtualenvs need to be installed on systems without compilers. In particular, Talos systems don't have compilers or development libraries installed. For these cases, we install packages that can fall back to a pure-python implementation when the compile fails. The tarball of Twisted-10.2.0 is *not* the one from pypi; that tarball was unpacked, ''conditionalExtensions'' was set to ''[]'' in both ''setup.py'' and ''twisted/topfiles/setup.py'', and a new tarball made with ''setup.py sdist'', and the result is in the python-packages directory. Newer Twisteds may not need this treatment -- who knows. |
Revision as of 20:59, 1 June 2018
The python module uses this data tree to get python packages.
In general, these are just downloads from pypi. However, a few packages are special - see below.
These packages are at
and can also be sourced at
- puppet:///python/packages
in file resources.
Adding files
In general, you do not need to manual add files to the Python data directories. The Distingished Puppet Master will automatically walk through the Puppet Manifests and download any missing Python packages defined in a requirements file.
If you are deploying a package that is _not_ hosted on Pypi (for example, a scriptworker package) you must add it to the Python package directory manually, and you should mark it as "# puppet: nodownload" in the requirements file.
Mirror Access
If you would like to point your 'pip' at the python repository, you'll want a ~/.pip/pip.conf that looks something like
[global] no-index = true find-links = http://puppetagain.pub.build.mozilla.org/data/python/packages
Special Cases
virtualenv.py
An un-packaged copy of virtualenv.py is at python/packages/virtualenv.py. More recently, updated versions of virtualenv have been unpacked to "virtualenv-$version" directories in both python/packages and python/packages-3.x. These are all used to bootstrap new virtualenvs.
Twisted
Some virtualenvs need to be installed on systems without compilers. In particular, Talos systems don't have compilers or development libraries installed. For these cases, we install packages that can fall back to a pure-python implementation when the compile fails. The tarball of Twisted-10.2.0 is *not* the one from pypi; that tarball was unpacked, conditionalExtensions was set to [] in both setup.py and twisted/topfiles/setup.py, and a new tarball made with setup.py sdist, and the result is in the python-packages directory. Newer Twisteds may not need this treatment -- who knows.