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

running from source - missing reqs #531

Closed
starenka opened this issue Aug 12, 2020 · 5 comments · Fixed by #692
Closed

running from source - missing reqs #531

starenka opened this issue Aug 12, 2020 · 5 comments · Fixed by #692

Comments

@starenka
Copy link

starenka commented Aug 12, 2020

Can we please state required python libs to run from source? They're not stated in setup.py/requirement file. I run it now on using current pygobject & mutagen

mutagen~=1.45.1
PyGObject~=3.36.1

Is there a reason why the reqs are not in setup.py and therefore would be installed when doing python setup.py install?

@mathiascode
Copy link
Member

Main reasons: the native package manager of the OS is recommended for deps, nobody has asked for a requirements.txt file previously, and it's one less dependency list to keep up to date.

https://github.com/Nicotine-Plus/nicotine-plus/blob/master/doc/DEPENDENCIES.md
https://github.com/Nicotine-Plus/nicotine-plus/blob/2.0.1/doc/DEPENDENCIES.md

@starenka
Copy link
Author

starenka commented Aug 13, 2020

I don't think encouraging people to sudo python install and using global site-packages is good idea (in general). It is a bad idea as different apps could require different lib versions and you can easily end up in a situation that something does not work. The virtualenv approach should be suggested and thus you need those requirements to install in virtualenv. I don't know how packaging python app works (for linux/macos etc), but stating those reqs in setup.py/requirements.txt is standard python way to make these reqs installed in the env. I'm aware of the "the OS is recommended for deps" but it applies to packaged versions, not running from source.

@mathiascode
Copy link
Member

Thanks for the heads up about virtualenv, sounds like a good approach. I'll look into it closer at some point.

@starenka
Copy link
Author

starenka commented Aug 13, 2020

jolly good! thanks for the effort....

it basically boils down to:

git clone https://github.com/Nicotine-Plus/nicotine-plus.git /tmp/nicotine-plus
cd /tmp/nicotine-plus
python3 -m venv .env
# (now either use `source .env/bin/activate` which will allow you to run python and pip without the full path or use full paths for pip and python - will show you the latter one as it is more universal)
/tmp/nicotine-plus/.env/bin/pip install -r requirements.txt #if requiements not in setup.py
/tmp/nicotine-plus/.env/bin/python setup.py install

to run just: /tmp/nicotine-plus/.env/bin/python /tmp/nicotine-plus/nicotine
to update, just pull from the repo and redo all steps from the pip install

@starenka
Copy link
Author

starenka commented Oct 9, 2020

Nice! Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants