open-cogsci / OpenSesame

Graphical experiment builder for the social sciences
http://osdoc.cogsci.nl/
GNU General Public License v3.0
234 stars 111 forks source link

Dependency naming issues/questions #766

Closed antecrescent closed 3 years ago

antecrescent commented 3 years ago

Hi! I am having a hard time packaging OpenSesame for Arch Linux. This programme depends on pyqode3.python, according to its setup.py file. Your fork of said programme either names itself either pyqode.python or pyqode3.python. Unfortunately, I am not sure, what the following lines of code actually mean: pypi_release = os.environ.get('PYPI_RELEASE', 0) name='pyqode3.python' if pypi_release else 'pyqode.python',

When I download the latest tarball from pypi.org and install it manually via: python setup.py install --root=$pkgdir --optimize=1 the package gets named pyqode.python, thus making it incompatible with OpenSesame.

When I asked on Arch Linux's IRC channel about the issue, I was made aware of another related (?) problem: Installing pyqode3.python via pip install pyqode3.python --no-binary :all: fails with: Using cached pyqode3.python-3.0.2.tar.gz (<- the following three lines get repeated for each version of the tarball down to v3.0.2) WARNING: Generating metadata for package pyqode3.python produced metadata for project name pyqode-python. Fix your #egg=pyqode3.python fragments. WARNING: Discarding https://files.pythonhosted.org/packages/d5/40/582b6c160b4652aa2011c4765bfcc18791ff72df636d9ca65f422cb5661a/pyqode3.python-3.2.3.tar.gz#sha256=354634568a866c4d3569d47c61096f83c25b0f35c0b8c570adfed74b03a18020 (from https://pypi.org/simple/pyqode3-python/). Requested pyqode-python from https://files.pythonhosted.org/packages/d5/40/582b6c160b4652aa2011c4765bfcc18791ff72df636d9ca65f422cb5661a/pyqode3.python-3.2.3.tar.gz#sha256=354634568a866c4d3569d47c61096f83c25b0f35c0b8c570adfed74b03a18020 has different name in metadata: 'pyqode.python'

The final message reads: ERROR: Could not find a version that satisfies the requirement pyqode3.python ERROR: No matching distribution found for pyqode3.python

The same problem arises for pyqode3.core.

There seems to be a naming error/inconsistency with these two forks (and OpenSesame). I hope, this helps :)

smathot commented 3 years ago

Thanks for reporting this. If you want to install OpenSesame through pip, then (as you already figured, probably) you need pyqode3.python and pyqode3.core. The reason that I added the 3 is that the original pyqode isn't maintained anymore and I don't have access to their projects on pypi. (It may not have been a great choice to do it like this, but for now that's the status quo.)

In you case, the showstopper seems to be the error that you get while running pip install pyqode3.python --no-binary :all:. I wasn't aware of this problem, but it appears to only happen if you pass the --no-binary :all: flag. Otherwise it installs fine.

These lines:

pypi_release = os.environ.get('PYPI_RELEASE', 0)
name='pyqode3.python' if pypi_release else 'pyqode.python',

... are basically a way to control the dependencies while building by setting an environment variable (PYPI_RELEASE).

Can you work with this?

And thanks for your efforts!

antecrescent commented 3 years ago

Yes, this clarifies my issues :)