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

setup.py: add 'gui' extra. potentially build Qt icons files #4647

Merged
merged 1 commit into from
Aug 30, 2018

Conversation

SomberNight
Copy link
Member

Rotonen suggested on IRC that it would be nice to be able to just pip install from github and have a working installation with GUI; something like:

pip install -Ue git+https:/spesmilo/[email protected]#egg=electrum[fast,gui]

For this,

  • a gui extra is added that contains pyqt5
  • we try to build the icons_rc.py file if it's not present and if pyqt5 is installed

@Rotonen
Copy link

Rotonen commented Aug 21, 2018

Tried with pip install -Ue git+https:/SomberNight/electrum.git@setuptools_pyrcc#egg=electrum[fast,gui] and it fails to find the icon file. It'll also need to add it to the package resources / MANIFEST.in upon the extra.

Additionally the old guard responded to me on distutils-sig about how to detect extras gracefully:
https://mail.python.org/mm3/archives/list/[email protected]/thread/Z3LLXCCWWFHNRIHQTVFSHSYEJYNXSVXX/#Z3LLXCCWWFHNRIHQTVFSHSYEJYNXSVXX

@Rotonen
Copy link

Rotonen commented Aug 21, 2018

Seems one should have compiled it before sdist.read_manifest() kicks in, so it gets picked up along for the ride.

https:/pypa/setuptools/blob/0254a2fda8e8bd4f289d01e2179191e936517f04/setuptools/command/sdist.py#L180

So hook into sdist instead of install and compile the file before you run the original sdist.read_manifest().

@Rotonen
Copy link

Rotonen commented Aug 21, 2018

Sorry for the noise, user error.

Running pip install -U git+https:/SomberNight/electrum.git@setuptools_pyrcc#egg=Electrum[fast,gui] works.

The -e flag for pip makes the egg editable, which runs develop instead of install.

https:/pypa/setuptools/blob/0254a2fda8e8bd4f289d01e2179191e936517f04/setuptools/command/develop.py#L109

@SomberNight SomberNight merged commit c99007b into spesmilo:master Aug 30, 2018
UdjinM6 pushed a commit to UdjinM6/electrum-dash that referenced this pull request Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants