== Plan to develop automatic package creation from PyPI == [[http://www.python.org/pypi|PyPI]] Author: VincenzoDiMassa === Introduction === This wikipage describes the ongoing effort to develop an auto package builder for python modules. The auto package builder will be able to create packages by: 1. downloading the package distribuntion from [[http://www.python.org/pypi|PyPI]] 2. downloading and building the package source distribuntion from [[http://www.python.org/pypi|PyPI]] 3. using the setup.py of a modules's source distribution <
> <> '''WARNING''': the structure of the created package will be compatible with the goals of PythonModulePackaging: a single package of each module will be installed and will work with all python implementaions ubuntu supports. === SetupTools === [[http://www.python.org/pypi/setuptools/|SetupTools]] can download a module from PyPI, create an egg (a sort of python callable package) and install it.<
> It requires a modificaion to the .pth file in site-packages to make the python eggs available on sys.path.<
> A python-egg can be considered as a directory containing a module and its packaging related files ( EGG-INFO/PKG-INFO ~= debian/control ). === Planned usage of Setuptools === Because Setuptools: 1. can already download and install packages from PyPI 2. is actively developed 3. exists I think using them would be a good idea. (thanks Matthias)<
> My plan is: 1. create a [[http://www.python.org/pypi/setuptools/|SetupTools]] updated debian package 2. provide an [[#AddonModule|addon module]] that can generate an ubuntu package using SetupTools] 3. [[#Warining|After step 2]] actually generate the pakage <> ==== Addon Module ==== The addon module will just be a script like easy_install.py which will create a python module debian package of the module specified as argument.<
> For example to create the debian package for the graph module: {{{ $ easy_install_deb graph $ ls ... ... graph_x.y.z-1_noarch.deb ... ... $ }}} == Problems == I'm actually understanding what requirements are unmet as of now: * ''Build Dependencies'' which are not python modules: * Big problem: dependencies should be read PyPI but must refer to something that can be converted into debian packages. <
> We need a convension to refer to common depencies between debian/ubuntu/python. <
> PyPI uses a ''first came wins'' policy for the external dependency specification. * '''I am Ignoring this problem''' since I can't find a solution {{{(gurun_meditation_mode(true); open_for_suggestions(true);)}}}