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

Add a requirements.txt file #221

Closed
MerlijnWajer opened this issue Jan 28, 2018 · 12 comments
Closed

Add a requirements.txt file #221

MerlijnWajer opened this issue Jan 28, 2018 · 12 comments
Assignees
Labels
Accepted Accepted issue on our roadmap Feature New feature
Milestone

Comments

@MerlijnWajer
Copy link
Collaborator

Would love to have this for easy installing in a virtualenv. Most of the dependencies are already in the README and travis CI files

@MerlijnWajer MerlijnWajer added this to the 1.0 milestone Jan 28, 2018
@JoeLametta
Copy link
Collaborator

JoeLametta commented Jan 30, 2018

Is this enough?

musicbrainzngs
mutagen
pycdio>=0.17
requests
setuptools
https://downloads.sourceforge.net/sourceforge/cddb-py/CDDB-1.4.tar.gz
-e git+https://gitlab.gnome.org/GNOME/pygobject.git@PYGOBJECT_2_28_7  # python-gobject-2

@MerlijnWajer
Copy link
Collaborator Author

I think it lacks a few packages - I will start from a clean virtualenv and see what I can do.

@JoeLametta
Copy link
Collaborator

I think it lacks a few packages - I will start from a clean virtualenv and see what I can do.

It surely lacks requests (I've just added it).

  • I've seen a cdio import which I'm not sure if it's provided by pycdio.
  • In order to run the unit tests twisted is required.
  • /misc/offsets.py, which is not truly part of whipper, imports BeautifulSoup.

(I think) that's all folks!

@RecursiveForest
Copy link
Contributor

the cdio package is provided by pycdio-- you can verify this by typing import cdio; cdio.__file__ into the repl.

I don't think you need setuptools, it's included in virtualenvs by default.

Pinning to a particular commit hash is sort of unsavory-- why are we doing this? I've been installing python-gobject2 from my OS package manager without issue: currently on 2.28.6. If possible we should at least grab a tagged release from git if we can't grab a release tarball.

@RecursiveForest
Copy link
Contributor

Unfortunately the CDDB tarball is unavailable without javascript anymore (trying wget/curl'ing that URL), so that throws a small wrench into the works.

Additionally, when attempting to install pygobject from source with pip, I receive:

    Complete output from command python setup.py egg_info:                                               
    ********************************************************************                                 
    * Building PyGObject using distutils is only supported on windows. *                                 
    * To build PyGObject in a supported way, read the INSTALL file.    *                                 
    ********************************************************************                                 
                                                                                                         
    ----------------------------------------                                                             
Command "python setup.py egg_info" failed with error code 1 in /home/fox/testrequests/src/python-gobject2/

@JoeLametta
Copy link
Collaborator

JoeLametta commented Mar 2, 2018

Pinning to a particular commit hash is sort of unsavory-- why are we doing this?

That was equivalent to tag PYGOBJECT_2_28_7 (now edited and marked as such).

Unfortunately the CDDB tarball is unavailable without javascript anymore (trying wget/curl'ing that URL), so that throws a small wrench into the works.

Will see if I find a reliable replacement.

Additionally, when attempting to install pygobject from source with pip, I receive:

Need to investigate this one...

@RecursiveForest
Copy link
Contributor

When I tried to pip install -r, the pygobject2 line failed with a message saying one must define the egg name with "#egg=" in the URL. Trying that led to the above PyGObject message, which is their way of encouraging you to install it via your operating system.

I would recommend not spending much time on this, as we'd eventually like to get very far away from pygobject2, and having a 100% comprehensive requirements.txt file is not required. I'd be happy with one that simply listed (like the one I keep on my computer for when I set up new development environments) everything besides pygobject2. We could even leave a note in the file (and the readme, as we already do) saying to install it via your package manager.

The sourceforge issue is a real one, but one that affects many other projects, so a solution may present itself with time. For now: https://github.com/RecursiveForest/py-cddb/releases/tag/v1.4

@MerlijnWajer
Copy link
Collaborator Author

I would leave out the pygobject2 stuff as well. Otherwise, seems good. Yes, we can use @RecursiveForest repo for CDDB - might make more sense.

@JoeLametta
Copy link
Collaborator

JoeLametta commented Mar 3, 2018

For the future, if we decide to keep using the CDDB dependency, there's also @Freso's Python 3 port of it: here.

Here's the updated requirements.txt file (still missing version numbers).

https://ftp.openbsd.org/pub/OpenBSD/distfiles/py-cddb/CDDB-1.4.tar.gz
musicbrainzngs
mutagen
pycdio>0.16,<2.0.0
requests

@Freso
Copy link
Member

Freso commented Mar 3, 2018

I'd test my port a bit before relying on my cddb-py port. It is a fully automated and when I played around with it a bit, it didn't really perform as expected, IIRC. (Also, cddb-py doesn't handle Unicode at all. I'm not sure if that somehow magically has come "for free" by porting to Py3 though.)

@GitHubGeek
Copy link

May I suggest go beyond requirements.txt and go with Pipenv. It gives you free virtualenv managemen and many more.

@JoeLametta
Copy link
Collaborator

JoeLametta commented Sep 24, 2018

TODO:

  • Check if PyGObject should be added to the requirements.txt file.
  • Mention requirements.txt in whipper's README.
  • Create PR.

JoeLametta added a commit that referenced this issue Oct 18, 2018
Still need to update whipper's README to mention this file...

Fixes #221.
JoeLametta added a commit that referenced this issue Oct 23, 2018
@JoeLametta JoeLametta added Accepted Accepted issue on our roadmap Feature New feature and removed enhancement labels Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Feature New feature
Projects
None yet
Development

No branches or pull requests

5 participants