Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation for manual installation #73

Closed
wellic opened this issue May 12, 2020 · 13 comments
Closed

Update documentation for manual installation #73

wellic opened this issue May 12, 2020 · 13 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@wellic
Copy link

wellic commented May 12, 2020

I updated code and reinstalled last version from master.

# python3 setup.py install --record=install-files.txt --prefix=/usr/local

But I got error when starting:

$ terminator
Traceback (most recent call last):
  File "/usr/local/bin/terminator", line 4, in <module>
    __import__('pkg_resources').run_script('terminator==1.92', 'terminator')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 658, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1429, in run_script
    .format(**locals()),
pkg_resources.ResolutionError: Script 'scripts/terminator' not found in metadata at None

I found using git bisect last good commit e4cd22b7 after this commit I can't start application.
Could you please check or update INSTALLATION.md how to install terminator correctly.
I am using UBUNTU 18.04.

Now I am using version from good commit:
git co e4cd22b7

@wellic wellic changed the title Broken last version Can't run last version after install from master May 12, 2020
@mattrose
Copy link
Member

Can you throw up a github link to that commit?

@lazyfrosch
Copy link
Member

according to user:
good: e4cd22b
bad: 8ae3253

Haven't tested manual installation yet

@mattrose
Copy link
Member

Ah, I was wondering if it had to do with the setuptools integration.

@lazyfrosch
Copy link
Member

This is definitely a problem with Python 3.6 or older setuptools.

python3             3.6.7-1~18.04
python3-setuptools  39.0.1-2

The script is generated as a wrapper, and not the whole script is copied:

$ cat /usr/local/bin/terminator 
#!/usr/bin/python3
# EASY-INSTALL-SCRIPT: 'terminator==1.92','terminator'
__requires__ = 'terminator==1.92'
__import__('pkg_resources').run_script('terminator==1.92', 'terminator')

@lazyfrosch lazyfrosch added this to the 2.0 milestone May 12, 2020
@lazyfrosch lazyfrosch added the bug Something isn't working label May 12, 2020
@lazyfrosch
Copy link
Member

Okay this kind of wrapper script actually should work, what I did on Ubuntu 18.04:

$ python3 setup.py build
...
$ python3 setup.py install
...
$ find /usr/local -name terminator
/usr/local/bin/terminator
/usr/local/lib/python3.6/dist-packages/terminator-1.92-py3.6.egg/EGG-INFO/scripts/terminator
/usr/local/lib/python3.6/dist-packages/terminator-1.92-py3.6.egg/share/terminator

$ terminator -u --version
terminator 1.92 (of course from git)

Can you please verify this again, maybe check this EGG-INFO directory?

In the older versions /usr/local/bin/terminator is a wrapper and /usr/local/lib/python3.6/dist-packages/terminator-1.92-py3.6.egg/EGG-INFO/scripts/terminator the script.

@wellic
Copy link
Author

wellic commented May 13, 2020

Thank you. All OK.

I uninstalled.

sudo python3  setup.py uninstall --manifest=install-files.txt

Next, I deleted everything that I found in /usr/local

sudo find /usr/local -name terminator*

I pulled master and installed again:

$ git checkout master
$ git pull
$ sudo python3 setup.py build
$ sudo python3 setup.py install --record=install-files.txt --prefix=/usr/local

Result - successful

$terminator --version -u
terminator 1.92

I think that part of the previous installations disrupted normal operation.

The problem can be closed. I think it would be nice to add in README that in case of a failure during installation, the user has to make sure that there are no files left from the previous installation.
I missed it on my mind.

@lazyfrosch Thank you for your help.

@lazyfrosch
Copy link
Member

I'm thinking about updating the clean command, and adding a clearer explanation to INSTALL.md

After #70 that is.

@lazyfrosch lazyfrosch added documentation Improvements or additions to documentation and removed bug Something isn't working labels May 13, 2020
@lazyfrosch lazyfrosch changed the title Can't run last version after install from master Update documentation for manual installation May 13, 2020
@wellic
Copy link
Author

wellic commented May 13, 2020

Also for ubuntu I added some packages

sudo apt install libcairo2-dev python3-dev  \
 python3-gi python3-psutil python3-configobj gir1.2-keybinder-3.0 gettext intltool

@mattrose
Copy link
Member

Adding a clean target would be a nice touch, as I tend to run git clean -fdx between setup.py commands, but that's not available if you just got an archive, and not cloned a git repo.

@lazyfrosch
Copy link
Member

Came upon this extension to setuptools yesterday: pypa/setuptools#1347 (comment)

@mattrose
Copy link
Member

mattrose commented Oct 9, 2020

The wrapper script only solved part of the problem. As well, None of the assets were being installed (see #227). I managed to find the magic invocation that installs assets where the system expects them to be. Can we close this bug, and re-open one for the clean target? I always have to read through this bug to figure out why it's not closed yet.

@lazyfrosch lazyfrosch modified the milestones: 2.0, 2.1 Jan 3, 2021
@timur-g
Copy link

timur-g commented Oct 25, 2024

I did not check but this seems rather old, is this really still an issue, or this can be closed. I assume there would be activity if it were.

@mattrose
Copy link
Member

Going to close this. If @lazyfrosch still wants to fix his clean command, he can open a new one :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants