Discussion:
[Slackbuilds-users] Python, pip and SlackBuilds.... Fw: [leo-editor/leo-editor] "python setup.py install" does not complete (#810)
sborg63
2018-08-26 16:00:37 UTC
Permalink
Hi all,

There are python programs that no longer depend on setup.py scripts
using install but exclusively on those that use pip (for example LEO, as
described below). How are we dealing with this? Is there a way of
adapting the Slackbuilds for such programs or do we accept that pip
becomes another way of dealing with python (It already is part of the
python distribution in current)? Or do we ask upstream to keep providing
a setup.py that can use install?

Background:
As a response to my request for a setup.py install script for the
LEO editor (https://github.com/leo-editor/leo-editor/issues/810), the
answer is to use pip: The recent version has changed to a complete
pip-install and bypasses the possibility of using the setup.py install
method. The latter is -as far as I have been using python
modules/packages in Slackware- the method of choice to build a package
via a SlackBuild which produces a tgz-package that can then be
installed/updated using the common slackware tools.

The idea behind the pip-only install is that determining
updates/dependencies is much easier (with the presumed improvements
linked below). At the moment on SBo these dependencies have been sorted
out (and SlackBuilds made available) which allows a slacker to use one
install-method (the distribution-specific tools) instead of a mixture
of tools (distribitution plus tool-specific methods (like pip for
python)).

Cheers,

Rob

Begin forwarded message:

Date: Sun, 26 Aug 2018 01:05:16 -0700
From: matt wilkie <***@github.com>
To: leo-editor/leo-editor <leo-***@noreply.github.com>
Cc: brobr <***@disroot.org>, Author <***@noreply.github.com>
Subject: Re: [leo-editor/leo-editor] "python setup.py install" does not
complete (#810)
Could such a setup.py be restored in the 'leo/dist/' folder of 5.7
[...}
The 5.6 setup.py and friends can be found at
https://github.com/leo-editor/leo-editor/tree/5.6/leo/dist and will be
there for as long as Github is. Copying from the Github tag to root of
a local Leo folder is functionally equivalent to copying from local
dist folder to root:

wget
https://raw.githubusercontent.com/leo-editor/leo-editor/5.6/leo/dist/setup.py
\ -O=~/my-leo-distrib/setup.py
...for those who like to create distribution-specific packages (and
want to bypass pip)?
There have a been changes in setup.py since 5.6 not specifically
related to pip. Sooner or later using the old version will probably
stop working. [Pip solves a lot of
problems](https://stackoverflow.com/a/15731459/14420), are you sure you
can't use it? If there are specific reasons you can't, re-open this
issue and we can explore what might be done. I'll need information and
feedback though as I don't know about building distribution packages.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/leo-editor/leo-editor/issues/810#issuecomment-416021532
Duncan Roe
2018-08-27 01:13:03 UTC
Permalink
Ui Rob,
Post by sborg63
Hi all,
There are python programs that no longer depend on setup.py scripts
using install but exclusively on those that use pip (for example LEO, as
described below). How are we dealing with this? Is there a way of
adapting the Slackbuilds for such programs or do we accept that pip
becomes another way of dealing with python (It already is part of the
python distribution in current)? Or do we ask upstream to keep providing
a setup.py that can use install?
As a response to my request for a setup.py install script for the
LEO editor (https://github.com/leo-editor/leo-editor/issues/810), the
answer is to use pip: The recent version has changed to a complete
pip-install and bypasses the possibility of using the setup.py install
method. The latter is -as far as I have been using python
modules/packages in Slackware- the method of choice to build a package
via a SlackBuild which produces a tgz-package that can then be
installed/updated using the common slackware tools.
The idea behind the pip-only install is that determining
updates/dependencies is much easier (with the presumed improvements
linked below). At the moment on SBo these dependencies have been sorted
out (and SlackBuilds made available) which allows a slacker to use one
install-method (the distribution-specific tools) instead of a mixture
of tools (distribitution plus tool-specific methods (like pip for
python)).
Cheers,
Rob
[...]
Yes leo only has a whheel, not a tar.gz. This is unusual and unfortunate,
because pip2tgz needs a source archive of some kind.

I tried pip2tgz on a couple od snapshots, but it always fails with:

running install_egg_info
Copying leo.egg-info to /tmp/SBo/package-leo-editor/usr/lib64/python2.7/site-packages/leo-5.7.3-py2.7.egg-info
running install_scripts
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-FnJDwJ/setup.py", line 164, in <module>
'gui_scripts': ['leo = leo.core.runLeo:run']
File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib64/python2.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib64/python2.7/distutils/command/install.py", line 575, in run
self.run_command(cmd_name)
File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib64/python2.7/site-packages/setuptools/command/install_scripts.py", line 35, in run
bw_cmd = self.get_finalized_command("bdist_wininst")
File "/usr/lib64/python2.7/distutils/cmd.py", line 312, in get_finalized_command
cmd_obj.ensure_finalized()
File "/usr/lib64/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/usr/lib64/python2.7/distutils/command/bdist_wininst.py", line 112, in finalize_options
for script in self.distribution.scripts:
TypeError: 'NoneType' object is not iterable


I can't fix this. Anyone??

Cheers ... Duncan.
_______________________________________________
SlackBuilds-users mailing list
SlackBuilds-***@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/

Loading...