GoogleCodeArchives / editra

Automatically exported from code.google.com/p/editra
Other
0 stars 0 forks source link

setup.py misses install_requires #406

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Since Editra requires wxPython, it makes sense to use `requires` 
(distutils) or `install_requires` (setuptools) in its setup.py.

This would help the package managers for Python.

Original issue reported on code.google.com by Sridhar....@gmail.com on 4 Sep 2009 at 6:00

GoogleCodeExporter commented 9 years ago
Hi,

How would this help the package managers for Python? Editra is written in 
Python but
has nothing to do with the Python project beyond tha.

Cody

Original comment by CodyPrec...@gmail.com on 4 Sep 2009 at 12:08

GoogleCodeExporter commented 9 years ago
Any Python package can also be installed via tools like:

 - easy_install
 - pip
 - enstaller
 - pythonpkgmgr
 - PyPM (ActiveState's upcoming package manager)

These tools will look for `install_requires` (PyPM also looks for `requires`) 
to 
automatically build/install the dependencies.

Even though you provide binary installers (.exe, .dmg) packaged with these 
dependencies, nothing prevents the users to install a Python package through a 
package manager. For instance, Linux users would expect "easy_install Editra" 
or 
"pip install Editra" to just work -- currently it does not work due to missing 
dependencies.

Original comment by Sridhar....@gmail.com on 4 Sep 2009 at 7:02

GoogleCodeExporter commented 9 years ago
> Editra is written in Python but has nothing to 
> do with the Python project beyond tha.

Further I imagine that a text editor written using an interpreted language X 
would 
naturally provide the feature of `plugins` written in the same language? http://
lucumr.pocoo.org/2006/7/30/setuptools-plugins

Original comment by Sridhar....@gmail.com on 4 Sep 2009 at 7:05

GoogleCodeExporter commented 9 years ago
Hi,

I think I just misunderstood your first post as implying that since my setup.py 
file
was not using some optional argument it was affecting the developers of Python 
itself.

I can try adding it but I think that there were some issues with it (namely 
wxPython
not being able to be installed through pypi) is why that argument was not used. 
When
Editra starts it checks for wxpython and will display an informative message if 
its
missing. Have you tested adding the required params to the setup file to see if 
they
actually work? If so feel free to provide a patch (this is open software after 
all).

Most Linux distributions use there own package management systems (synaptic, 
portage,
etc..) that declare the dependencies for the software that they are 
distributing and
handle this at that level. Editra is an application and not a python library so 
I
have been wanting to change the source install completely to not install into
site-packages.

Sorry, not completely sure of the context of your 3rd comment? Editra has and 
uses a
setuptools based plugin system already.

Regards,

Cody

Original comment by CodyPrec...@gmail.com on 4 Sep 2009 at 7:21

GoogleCodeExporter commented 9 years ago
> there were some issues with it (namely wxPython
> not being able to be installed through pypi) is 
> why that argument was not used.

This may be true for easy_install, pip .. but in near future PyPM will be 
providing 
wxPython binaries. (I am the original developer behind PyPM).

> Have you tested adding the required params to the 
> setup file to see if they actually work? 

I have not verified the effect of `install_requires` on Editra. It may not work 
out 
of the box (by doing 'python setup.py install'), but the central point I am 
making 
is that .. it will complete the *metadata* of Editora (i.e., Edtira's PKG-INFO 
will 
contain install_requires on wxPython)

> If so feel free to provide a patch (this is open 
> software after all).

The patch would be as simple as adding an `install_requires = ["wxPython"]` to 
the 
setup(...) arguments.

> Most Linux distributions use there own package 
> management systems (synaptic, portage, etc..) 
> that declare the dependencies for the software that 
> they are distributing and handle this at that level.

Yet tools like enstaller, PyPM, pip, easy_install rely on setuptools' 
`install_requires`. enstaller, in particular, is a proprietory fork of 
setuptools 
that provide prebuilt eggs for various popular Python packages. For instance, 
go to 
http://code.enthought.com/enstaller/eggs/windows/xp/ and do a search for 
'wxPython'. 
Tools like enstaller (and the upcoming PyPM) relies on `install_requires` (or 
distutils's `requires`) to properly install an application or package.

> Editra is an application and not a python library so I
> have been wanting to change the source install completely
> to not install into site-packages.

If you intend to bundle a Python interpreter along with Editra, there may not 
be 
much use (for other packaging tools) in completing the setup.py egg metadata.

> Sorry, not completely sure of the context of your 
> 3rd comment? Editra has and uses a
> setuptools based plugin system already.

Nevermind about that comment; I misunderstood as you referring to Python. But 
you 
clarified that you were referring to the Python language project.

Original comment by Sridhar....@gmail.com on 4 Sep 2009 at 8:28

GoogleCodeExporter commented 9 years ago
Hi,

What would the package name be for wxPython? (wx, wxPython, something else)?

Thanks,

Cody

Original comment by CodyPrec...@gmail.com on 15 Oct 2009 at 2:09

GoogleCodeExporter commented 9 years ago
wxPython - pypi.python.org/pypi/wxPython

Original comment by Sridhar....@gmail.com on 15 Oct 2009 at 2:25

GoogleCodeExporter commented 9 years ago
That is from wxPython 2.6 (ancient), the wxPython module was in the middle of 
being
transitioned from being

from wxPython import *

to the now current

import wx

So I am not sure if that package would still be true as it has not been 
maintained on
pypi for I would guess at least 4 years.

Maybe I will just ask Robin what his plans are if he ever decides to support 
pypi again.

Thanks,

Cody

Original comment by CodyPrec...@gmail.com on 15 Oct 2009 at 2:32

GoogleCodeExporter commented 9 years ago
added 

install_requires = ['wxPython',]

Get warnings about 'unrecognized keyword 'install_requires'' when running the 
setup
script but it doesn't appear to break anything so will leave it in.

Original comment by CodyPrec...@gmail.com on 5 Jan 2010 at 9:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
`install_requires` requires setuptools (now maintained under the name of 
Distribute) to 
be 
installed. See http://packages.python.org/distribute/using.html

Original comment by Sridhar....@gmail.com on 5 Jan 2010 at 9:51