Skip to content

Document releasing, installing#97

Merged
raboof merged 3 commits into
masterfrom
pypiInstallation
May 12, 2018
Merged

Document releasing, installing#97
raboof merged 3 commits into
masterfrom
pypiInstallation

Conversation

@raboof

@raboof raboof commented May 10, 2018

Copy link
Copy Markdown
Member

Moved 'installing from source' to developer page

Uploaded to pypi-test, seems OK now, try it with:

pip3 install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple inkcut-rabooftest4

Perhaps another final test before publishing 2.0.4 to the real pypi?

raboof added 2 commits May 10, 2018 12:44
Moved 'installing from source' to developer page

Uploaded to pypi-test, *seems* OK now, try it with:

  pip3 install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple inkcut-rabooftest4

Perhaps another final test before publishing 2.0.4 to the real pypi?
@codecov-io

codecov-io commented May 10, 2018

Copy link
Copy Markdown

Codecov Report

Merging #97 into master will increase coverage by 0.8%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #97     +/-   ##
=========================================
+ Coverage   50.73%   51.54%   +0.8%     
=========================================
  Files          32       32             
  Lines        2594     2594             
=========================================
+ Hits         1316     1337     +21     
+ Misses       1278     1257     -21
Impacted Files Coverage Δ
inkcut/device/transports/disk/plugin.py 48.83% <0%> (+48.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59a6ecf...cf35b73. Read the comment docs.

@frmdstryr

Copy link
Copy Markdown
Collaborator

Looks good. Any reason why you have python3-pyside?

@raboof

raboof commented May 10, 2018

Copy link
Copy Markdown
Member Author

Well, if I don't, on a fresh ubuntu python3 install I get:

root@8ca8efe94286:/# inkcut
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/qtpy/__init__.py", line 169, in <module>
    from PySide import __version__ as PYSIDE_VERSION  # analysis:ignore
ImportError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/inkcut", line 7, in <module>
    from inkcut.app import main
  File "/usr/local/lib/python3.5/dist-packages/inkcut/app.py", line 15, in <module>
    from inkcut.core.workbench import InkcutWorkbench
  File "/usr/local/lib/python3.5/dist-packages/inkcut/core/workbench.py", line 17, in <module>
    enamlx.install()
  File "/usr/local/lib/python3.5/dist-packages/enamlx/__init__.py", line 3, in install
    from enamlx.qt import qt_factories
  File "/usr/local/lib/python3.5/dist-packages/enamlx/qt/qt_factories.py", line 8, in <module>
    from enaml.qt.qt_factories import QT_FACTORIES
  File "/usr/local/lib/python3.5/dist-packages/enaml/qt/__init__.py", line 8, in <module>
    from qtpy import API as QT_API, PYQT5_API, PYQT4_API, PYSIDE_API, PYSIDE2_API
  File "/usr/local/lib/python3.5/dist-packages/qtpy/__init__.py", line 175, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found
root@8ca8efe94286:/#

Not sure if installing python3-pyside is the best solution here, but it seems to work :)

@frmdstryr

Copy link
Copy Markdown
Collaborator

I've been getting an error in #93 saying that both Qt5 and Qt4 libraries are being imported. PySide is Qt4 but the default for python 3 is PyQt5. It seems like somewhere PySide is being imported when it shouldn't be. It would be good to find what's really going on with this.

If os.environ['QT_API'] == 'pyqt5' is set explicitly in either inkcut/app.py or inkcut/core/workbench.py does it fix the initial ImportError?

@raboof

raboof commented May 10, 2018

Copy link
Copy Markdown
Member Author

In this case it was qtpy trying to load qt5 and falling back to pyside when the failed:

if API in PYQT5_API:
    try:
        from PyQt5.QtCore import PYQT_VERSION_STR as PYQT_VERSION  # analysis:ignore
        from PyQt5.QtCore import QT_VERSION_STR as QT_VERSION  # analysis:ignore
        PYSIDE_VERSION = None
    except ImportError as e:
        API = os.environ['QT_API'] = 'pyside2'

Since qt5 was not installed this failed, making qtpy fall back to pyside.

Indeed installing python3-pyqt5 seems like a better solution!

@raboof raboof merged commit 03ad29d into master May 12, 2018
@raboof raboof deleted the pypiInstallation branch May 12, 2018 08:43
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.

3 participants