Opened 2 years ago

Closed 18 months ago

#56636 closed update (fixed)

Eric4 is obsolete. Update to Eric6

Reported by: josephsacco Owned by: reneeotten (Renee Otten)
Priority: Normal Milestone:
Component: ports Version: 2.5.2
Keywords: Cc: giansalvo (gians), reneeotten (Renee Otten)
Port: eric4

Description

Version 4 of the Eric IDE is obsolete. The current version is Eric6, release 18.06. I have made an attempt at creating a Portfile to build eric6@18.06 using python27 and qt5 [see attached Portfile]. Someone else who actually understands Portfiles in depth could use the attached Portfile as a starting point and generalize it to support python3.x and qt4.

The author of Eric6, Detlev Offenbach, has made the install.py script "smart". A number options have been added as well as an awareness of the python environment you choose to use. Run the script with a given version of python and the "-h" flag and it will tell you where it is planning to put things. For example:

cavandish:eric6-18.06 jsacco$ /opt/local/bin/python2.7 install.py -h

Usage:
    install.py [-chxyz] [-a dir] [-b dir] [-d dir] [-f file] [-i dir] [-m name] [-p python] [--pyqt=version]
where:
    -h, --help display this help message
    -a dir     where the API files will be installed
               (default: /opt/local/libexec/qt5/qsci/api)
    --noapis   don't install API files
    -b dir     where the binaries will be installed
               (default: /Users/jsacco/bin)
    -d dir     where eric6 python files will be installed
               (default: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages)
    -f file    configuration file naming the various installation paths
    -i dir     temporary install prefix
               (default: None)
    -m name    name of the Mac app bundle
               (default: eric6.app)
    -n path    path of the directory the Mac app bundle will
               be created in
               (default: /Applications)
    -p python  path of the python executable
               (default: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python)
    -c         don't cleanup old installation first
    -x         don't perform dependency checks (use on your own risk)
    -y         add the Python variant to the executable names
    -z         don't compile the installed python files
    --pyqt=version version of PyQt to be used (one of 4 or 5)
                   (default: 5)

The file given to the -f option must be valid Python code defining a
dictionary called 'cfg' with the keys 'ericDir', 'ericPixDir', 'ericIconDir',
'ericDTDDir', 'ericCSSDir', 'ericStylesDir', 'ericDocDir', 'ericExamplesDir',
'ericTranslationsDir', 'ericTemplatesDir', 'ericCodeTemplatesDir',
'ericOthersDir','bindir', 'mdir' and 'apidir.
These define the directories for the installation of the various parts of eric6.

The Portfile I created, used the '-b', '-i', '-n' flags along with --pyqt:

destroot {
    system -W ${worksrcpath} "${prefix}/bin/python2.7 install.py -b '${prefix}/bin' -i '${destroot}' -n '${destroot}/Applications/MacPorts' --pyqt=5"
}

The '--pyqt' flag is not necessary when using the default, qt5. I left it in because, I also built a version of Eric6 using qt4.

I am thinking that adding the '-y' flag to label python variants would also be a good idea.

I am not sure that all of the dependencies that I 'borrowed' from the Eric4 Portfile are required. From the included 'README.rst':

eric6 may be used with any combination of Python 3 or 2, Qt5 or Qt4 and
PyQt5 or PyQt4. If the required packages (Qt5/4, QScintilla2, sip and PyQt5/4)
are not installed, please get them and install them in the following order
(order is important).

1. Install Qt5 (from The Qt Company)

2. Build and install QScintilla2 (from Riverbank Computing)

3. Build and install sip (from Riverbank Computing)

4. Build and install PyQt5 (from Riverbank Computing)

5. Build and install QScintilla2 Python bindings
   (part of the QScintilla2 package)

6. Install eric6

If you want to use the interfaces to other supported software packages, you may
install them in any order and at any time.

Please note, that the QScintilla2 Python bindings have to be rebuild, if
the PyQt5 package gets updated. If this step is omitted, a bunch of strange
errors will occur.

-Joseph

Attachments (14)

Portfile (2.6 KB) - added by josephsacco 2 years ago.
Portfile with qt4 / qt5 variants
Portfile_py27_qt4 (1.8 KB) - added by josephsacco 2 years ago.
Portfile python27 +qt4
Portfile_py27_qt5 (1.8 KB) - added by josephsacco 2 years ago.
Portfile python27 +qt5
Portfile_py36_qt4 (1.6 KB) - added by josephsacco 2 years ago.
Portfile python36 + qt4
Portfile_py36_qt5 (1.6 KB) - added by josephsacco 2 years ago.
Portfile python36 + qt5
Portfile_11July2018 (3.1 KB) - added by josephsacco 2 years ago.
Portfile as of 11July2018
Portfile_12July2018 (3.1 KB) - added by josephsacco 2 years ago.
Portfile as of 12_July_2018
Portfile_20July2018 (3.0 KB) - added by josephsacco 2 years ago.
Portfile as of 20July2018
Portfile_03Aug2018 (3.2 KB) - added by josephsacco 2 years ago.
Portfile as of 03Aug2018
Portfile_08Aug2018 (3.2 KB) - added by josephsacco 2 years ago.
Portfile as of 08Aug2018
Portfile.2 (3.2 KB) - added by mf2k (Frank Schima) 2 years ago.
Portfile.3 (3.2 KB) - added by josephsacco 21 months ago.
Portfile as of 12Feb2019
Portfile_19.02.1 (3.2 KB) - added by josephsacco 20 months ago.
Portfile for version 19.02.1
main.log (4.9 MB) - added by josephsacco 18 months ago.
Output from 'py27-eric-ide +qt5' build

Change History (55)

comment:1 Changed 2 years ago by mf2k (Frank Schima)

Keywords: Eric6 python removed

comment:2 Changed 2 years ago by mf2k (Frank Schima)

Is there some reason to keep eric4 around? No ports depend on it. I think this port should renamed to "eric" and the eric4 port be obsoleted by it.

comment:3 Changed 2 years ago by josephsacco

Agreed... There is no I can think of to keep Eric4 around.

-Joseph

comment:4 Changed 2 years ago by mf2k (Frank Schima)

A few comments:

  • As mentioned above, change the name to be "eric". It will require that master_sites be slightly modified.
  • It looks like it supports python 3. Please change the python dependencies to use py36.
  • The revision line should be deleted because it starts at 0 when increasing the version and that is the default value.
  • Any building should happen in the build phase, not the destroot phase. So just move the install command there.
  • Sort the dependencies by name.

comment:5 Changed 2 years ago by josephsacco

Comments

  • The author of Eric refers to the current branch as Eric6. [See the '-m' option for install.py shown at the top of this ticket.]
  • Eric does build and run using python3 [It builds and runs without incident within the Anaconda framework]
  • Revision line should be deleted - OK
  • Using the destroot phase to run install.py with options seems to be a common approach as can be seen by examining the Portfiles in /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/python/

Using the Spyder port as an example, I am thinking that in order to support multiple versions of python, the Eric port should be renamed py-eric.

There could / should be variants for qt4 and qt5, with qt5 being the default.

FWIW... I have tried, but not yet succeeded in building eric6 within the MacPorts environment using python3.6 and qt5. I am wrestling with dependencies

Checking dependencies
Python Version: 3.6.5
Found PyQt5
Found pyuic5
Found QScintilla2
Found QtGui
Found QtNetwork
Found QtPrintSupport
Found QtSql
Found QtSvg
Found QtWidgets
Sorry, please install PyQt5.QtWebEngineWidgets or PyQt5.QtWebKitWidgets.

Command failed: /opt/local/bin/python3.6 install.py -b '/opt/local/bin' -i '/opt/local/var/macports/build/_Users_jsacco_ports_devel_eric6/eric6/work/destroot' -n 'Applications/MacPorts' --pyqt=5

FWIW... The Anaconda3 build of Eric6 auto-magically invoked 'pip' to satisfy all required dependencies. When I get some more free cycles I will look into this further.

-Joseph

comment:6 Changed 2 years ago by josephsacco

Step, by step, by step...

I got Eric6 to build with python3.6.5 and qt4

DEBUG: Executing org.macports.destroot (eric6)
DEBUG: system -W /opt/local/var/macports/build/_Users_jsacco_ports_devel_eric6/eric6/work/eric6-18.06: /opt/local/bin/python3.6 install.py -b '/opt/local/bin' -i '/opt/local/var/macports/build/_Users_jsacco_ports_devel_eric6/eric6/work/destroot' -n 'Applications/MacPorts' --pyqt=4
Checking dependencies
Python Version: 3.6.5
Found PyQt4
Found pyuic4
Found QScintilla2
Found QtGui
Found QtNetwork
Found QtSql
Found QtSvg
Found QtWebKit
Qt Version: 4.8.7
sip Version: 4.19.8
PyQt Version: 4.12.1
QScintilla Version: 2.10.4
All dependencies ok.

Cleaning up old installation ...

Creating configuration file ...

Compiling user interface files ...

Compiling source files ...

Installing eric6 ...
Installing Python API files to '/opt/local/var/macports/build/_Users_jsacco_ports_devel_eric6/eric6/work/destroot/opt/local/libexec/qt4/share/qsci/api/python'.
Installing Ruby API files to '/opt/local/var/macports/build/_Users_jsacco_ports_devel_eric6/eric6/work/destroot/opt/local/libexec/qt4/share/qsci/api/ruby'.
Installing QSS API files to '/opt/local/var/macports/build/_Users_jsacco_ports_devel_eric6/eric6/work/destroot/opt/local/libexec/qt4/share/qsci/api/qss'.

Installation complete.

The problem that I see is specifying the correct, minimal set of dependencies. That fact that this build succeeded with a reduced dependency list in the Portfile may be a coincidence effected by all the qt4 packages I have installed on my iMac.

Below is the Portfile that I used:

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem      1.0

name            eric6
version         18.06
categories      devel
platforms       darwin
maintainers     nomaintainer
license         GPL-3

description     Eric is a full featured Python and Ruby editor and IDE, written in python

long_description \
    Eric is a full featured Python and Ruby editor and IDE, written in python. \
    It is based on the cross platform Qt gui toolkit, integrating the highly  \
    flexible Scintilla editor control. It is designed to be usable as everdays' \
    quick and dirty editor as well as being usable as a professional project \
    management tool integrating many advanced features Python offers the \
    professional coder.

homepage        http://eric-ide.python-projects.org/index.html
master_sites    sourceforge:project/eric-ide/${name}/stable/${version}/

checksums           rmd160  f2a65cc46c954567b6dba3e33ef720f4156d605a \
                    sha256  dcbd693bc611f3eed6b1fe09e5c44de6f73f1165afa459c792e0d93b12736a9a \
                    size    16641315

depends_lib     port:python36 \
                port:py36-pyqt4 \
                port:py36-qscintilla-qt4

use_configure   no

build {
    # Building and installing are synonymous
}

destroot {
    system -W ${worksrcpath} "${prefix}/bin/python3.6 install.py -b '${prefix}/bin' -i '${destroot}' -n 'Applications/MacPorts' --pyqt=4"
}

livecheck.type  regex
livecheck.url   http://eric-ide.python-projects.org/eric-news.html
livecheck.regex "eric (\\d+\\.\\d+) has been released"

comment:7 Changed 2 years ago by josephsacco

I think I've got it... The qt5 build requires py-pyqt5 to be built with the webengine variant:

jsacco$ port installed | grep webengine
  py27-pyqt5 @5.10.1_0+webengine (active)
  py36-pyqt5 @5.10.1_0+webengine (active)
  qt5-qtwebengine @5.10.1_0 (active)

That's a step forward...

I need to do some more digging.

comment:8 Changed 2 years ago by mf2k (Frank Schima)

Any progress?

In response about the name of the port. I still believe it should simply be called "eric" and track the latest version. We only ever put the version number in a port name when we intend to keep multiple versions around for compatibility reasons - e.g. gcc6, gcc7, etc. I see no need to do that here. If/when it moves to version 7, we would have to add/change the port name and that only makes things more difficult for users when updating. Unless I'm missing something?

Changed 2 years ago by josephsacco

Attachment: Portfile added

Portfile with qt4 / qt5 variants

Changed 2 years ago by josephsacco

Attachment: Portfile_py27_qt4 added

Portfile python27 +qt4

Changed 2 years ago by josephsacco

Attachment: Portfile_py27_qt5 added

Portfile python27 +qt5

Changed 2 years ago by josephsacco

Attachment: Portfile_py36_qt4 added

Portfile python36 + qt4

Changed 2 years ago by josephsacco

Attachment: Portfile_py36_qt5 added

Portfile python36 + qt5

comment:9 Changed 2 years ago by josephsacco

Frank,

Any progress?

The short answer is 'Yes'. The longer answer is I built a python3.6.6 / Qt5 version of Eric6 within an up-to-date MacPorts environment directly from source.

cavandish:eric6-18.06 jsacco$ sudo python3.6 install.py -b '/opt/local/bin' -n 'Applications/MacPorts'
Password:
Checking dependencies
Python Version: 3.6.6
Found PyQt5
Found pyuic5
Found QScintilla2
Found QtGui
Found QtNetwork
Found QtPrintSupport
Found QtSql
Found QtSvg
Found QtWidgets
Found QtWebEngineWidgets
Qt Version: 5.10.1
sip Version: 4.19.8
PyQt Version: 5.10.1
QScintilla Version: 2.10.7
All dependencies ok.

Cleaning up old installation ...

Creating configuration file ...

Compiling user interface files ...

Compiling source files ...

Installing eric6 ...
Installing Python API files to '/opt/local/libexec/qt5/qsci/api/python'.
Installing Ruby API files to '/opt/local/libexec/qt5/qsci/api/ruby'.
Installing QSS API files to '/opt/local/libexec/qt5/qsci/api/qss'.

Installation complete.

I have to admit that I do not have the TCL / Portfile expertise to create a Portfile for 'py-eric6' that I actually like. I spent some time prowling through some of the MacPorts python-app Portfiles attempting a "monkey-see-monkey-do" approach. I failed to create a single Portfile that I liked that correctly supports qt4/qt5 variants [see attachments]. Eventually, my interest turned elsewhere.

As for the name 'Eric6'... The name comes from Detlev Offenbach, the application developer, although he does appear to oscillate between calling the application Eric or Eric6. See https://eric-ide.python-projects.org/

-Joseph

comment:10 Changed 2 years ago by josephsacco

FWIW... I built a python3.6.6 / Qt4 version of Eric6 within an up-to-date MacPorts environment directly from source on an ancient G4 PowerMac running OSX 10.5.8.

-Joseph

comment:11 Changed 2 years ago by josephsacco

eric6-18.07 was released on 7July2018.

-Joseph

comment:12 Changed 2 years ago by josephsacco

I had some free cycles to expend so I continued hacking on the Portfile using the 'monkey-see-monkey-do' approach. The latest incantation, Portfile_11July2018, supports:

  • py27-eric6 + pyqt4
  • py27-eric6 + pyqt5 [default variant is pyqt5]
  • py36-eric6 + pyqt4
  • py36-eric6 + pyqt5 [default variant is pyqt5]

At this point some of the dependencies are probably missing. Also, there is yet no code to restrict the variant to +pyqt4 when building on platforms that do not support Qt5.

-Joseph

Changed 2 years ago by josephsacco

Attachment: Portfile_11July2018 added

Portfile as of 11July2018

comment:13 Changed 2 years ago by josephsacco

'monkey-see-monkey-do' approach continued...

I had depends_lib in the wrong location within the Portfile. I discovered this when I reran 'portindex', which then refused to index the port claiming 'python.version' was undefined. After reading the information at the top for the python Group file, I decided to move depends_lib inside of

if {$name} ne ${support} {
          ...
}

That seemed to fix things.

Attached is yet another version of the Portfile: Portfile_12july2018

I still don't know if the dependencies are complete.

-Joseph

Changed 2 years ago by josephsacco

Attachment: Portfile_12July2018 added

Portfile as of 12_July_2018

comment:14 Changed 2 years ago by mf2k (Frank Schima)

It is looking a lot better!

At line 40, if you change depends_lib to depends_lib-append then you can remove port:python${python.version} because the python portgroup will add it.

comment:15 Changed 2 years ago by mf2k (Frank Schima)

Also, remove the py34 and py35 versions but add py37 if it is supported.

Last edited 2 years ago by mf2k (Frank Schima) (previous) (diff)

comment:16 Changed 2 years ago by josephsacco

Adding port:python{python.version} as a dependency turns out to be unnecessary. The 'destroot' section explicitly uses ${python.bin}.

I pondered over how to determine the set of required dependencies for each variant. The problem is my iMac has many, many packages already installed. I believe the solution is to use python virtual environments, which will allow me to control which packages are available.

I did a simple experiment this morning. I setup virtual environments for both python36 and python37 and built eric6-18.07 directly from the source. The eric6 install.py script does a dependency check. When it determines something is missing, it asks if it should download the missing dependency using pip. I said 'yes' each time. Eric6 [default pyqt=5] built without error for both python36 and python37.

The minimal set of dependencies for each build are:

  • PyQt5
  • PyQt5-sip
  • QScintilla

as seen in package listings shown below:

(env-3.6) cavandish:env-3.6 jsacco$ pip list
Package    Version
---------- -------
pip        10.0.1
PyQt5      5.11.2
PyQt5-sip  4.19.12
QScintilla 2.10.7
setuptools 40.0.0
wheel      0.31.1

(env-3.7) cavandish:env-3.7 jsacco$ pip list
Package    Version
---------- -------
pip        10.0.1
PyQt5      5.11.2
PyQt5-sip  4.19.12
QScintilla 2.10.7
setuptools 40.0.0
wheel      0.31.1

The author of the Eric6 also lists "nice to have" python modules:

Optionally you may download and install the following python modules to make full use of the IDE and the offered plug-ins:

* Mercurial
* Subversion
* PySvn (Python interface to Subversion)
* Git
* PyLint
* CX_Freeze
* PyEnchant (spell checking)

Now to figure out the mapping between the dependencies lists and MacPorts.

The fun continues,

-Joseph

comment:17 Changed 2 years ago by josephsacco

I have updated the Portfile yet again:

  • removing dependency of qtpy [What was I thinking?]
  • adding 37 to the list of python versions

A MacPorts build using python3.7 awaits the the delivery of:

  • py37-qscintilla-qt5 [builds by adding 37 to the list of python versions]
  • py37-pyqt4
  • py37-qscintilla-qt4

As well as the nice-to-have extras:

  • py37-pysvn
  • py37-rope
  • py37-pylint
  • py37-cx_Freeze
  • py37-enchant

I built the qt5 version by commenting out the nice-to-have extras.

-Joseph

Changed 2 years ago by josephsacco

Attachment: Portfile_20July2018 added

Portfile as of 20July2018

comment:18 Changed 2 years ago by josephsacco

Step by step by step...

With the availability of:

  • py37-qscintilla-qt5
  • py37-pyqt4
  • py37-qscintilla-qt4

I can now build both:

  • py37-eric6 +pyqt4 [nice-to-have extras commented out]
  • py37-eric6 +pyqt5 [nice-to-have extras commented out]

Onwards,

-Joseph

comment:19 Changed 2 years ago by josephsacco

Time goes by... The current version of eric6 is 18.08. I have updated the Portfile [see Portfile_03Aug2018] to the new version. I also added a post-destroot section to fix an path issue in /Applications/MacPorts/eric6.app.

-Joseph

Changed 2 years ago by josephsacco

Attachment: Portfile_03Aug2018 added

Portfile as of 03Aug2018

comment:20 Changed 2 years ago by josephsacco

Older versions of OSX do not support QT5. I modified the Portfile th make QT4 the default for older versions:

  if { ${os.major} < 10 } {
        default_variants    +pyqt4
    }

See attachment: Portfile_08Aug2018

-Joseph

Changed 2 years ago by josephsacco

Attachment: Portfile_08Aug2018 added

Portfile as of 08Aug2018

Changed 2 years ago by mf2k (Frank Schima)

Attachment: Portfile.2 added

comment:21 Changed 2 years ago by mf2k (Frank Schima)

I have uploaded a new version with some tweaks:

  • Version updated to 18.09
  • Removed obsolete python 34 and 35 sub-ports
  • use depends_lib-append to not overwrite python portgroup dependencies
  • sort dependencies
  • Fix spacing to conform to modeline

comment:22 Changed 21 months ago by giansalvo (gians)

Hi, I'd like to install eric6. I have MacPorts Version: 2.5.4 installed and I can't find the package py37-eric6. Is you portfile still in development? Is it possible to use it and How can I use it to install eric6 on my system?

Last edited 21 months ago by giansalvo (gians) (previous) (diff)

comment:23 Changed 21 months ago by josephsacco

Create a local ports tree in your home directory to hold ports you are experimenting with:

  • In your home directory, create the directory tree: ~/ports/devel/py-eric6
  • Download the most recent Portfile from the attachments list above and install it under py-eric6
  • cd to ~/ports
  • run the command portindex to create a port index for your local ports tree

You are now good to go. To see this, run the command: port info py37-eric6

Note: Time stands still for no one. I see that Detlev Offenbac has updated Eric6 to version 19.02.

Edit the Portfile:

  • change version to 19.02
  • update checksums
    checksums rmd160  6289a33cc10a13c50c901589e7842b6f3d030bb1 \
                        sha256  5489f1abe33b2f7661ea91d4ee848e5f288ee8b569fe8f678feda18f2867b109 \
                        size    16881300
    

Welcome to MacPorts development... :-)

-Joseph

comment:24 Changed 21 months ago by mf2k (Frank Schima)

My latest build had a problem that I'm not remembering at the moment and so I was not happy committing the Port. I'll try to post my latest Portfile soon.

comment:25 Changed 21 months ago by josephsacco

Good enough... "We" will build it when it becomes available.

FWIW... I updated whatever Portfile I had in my local ports tree and built version 19.02. That worked on my iMac running 10.14.3.

-Joseph

comment:26 Changed 21 months ago by mf2k (Frank Schima)

Please attach your latest Portfile.

Changed 21 months ago by josephsacco

Attachment: Portfile.3 added

Portfile as of 12Feb2019

comment:27 Changed 21 months ago by josephsacco

FWIW...

py37-eric6@19.02_0+pyqt4 builds and runs on an ancient G4-based PowerMac running OS X 10.5.8.

The fun continues,

-Joseph

comment:28 Changed 21 months ago by mf2k (Frank Schima)

comment:29 in reply to:  23 Changed 20 months ago by giansalvo (gians)

Replying to josephsacco:

Create a local ports tree in your home directory to hold ports you are experimenting with:

  • In your home directory, create the directory tree: ~/ports/devel/py-eric6
  • Download the most recent Portfile from the attachments list above and install it under py-eric6
  • cd to ~/ports
  • run the command portindex to create a port index for your local ports tree

You are now good to go. To see this, run the command: port info py37-eric6

Hi Joseph, I did what you said and tried to install, but got some errors..

giansalvo$ sudo port install py-eric6 +webengine
--->  Computing dependencies for py-eric6
The following dependencies will be installed:  py27-eric6
Continue? [Y/n]: 
--->  Configuring py27-eric6
Error: Failed to configure py27-eric6: py27-pyqt5 must be installed with +webengine.
Error: See /opt/local/var/macports/logs/_Users_giansalvo_ports_devel_py-eric6/py27-eric6/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py-eric6 failed
Last edited 20 months ago by giansalvo (gians) (previous) (diff)

comment:30 Changed 20 months ago by giansalvo (gians)

Cc: giansalvo added

comment:31 Changed 20 months ago by mf2k (Frank Schima)

@giansalvo: You need to do what it says:

sudo port install py27-pyqt5 +webengine

comment:32 Changed 20 months ago by mf2k (Frank Schima)

FYI, never install the stub py-* port. Always install your desired python version of it. e.g. py37-eric6

comment:33 in reply to:  31 Changed 20 months ago by giansalvo (gians)

Replying to mf2k:

@giansalvo: You need to do what it says:

sudo port install py27-pyqt5 +webengine

Thanks.

I finally managed to install eric6 this way

$sudo port install py37-pyqt5 +webengine
[...]
$sudo port install py37-eric6

I think that the +webengine variant should be loaded automatically by py37-eric6 (only the second port install command should be issued by the user).

Last edited 20 months ago by giansalvo (gians) (previous) (diff)

comment:34 Changed 20 months ago by mf2k (Frank Schima)

Yes that is a long standing limitation. See #126.

Changed 20 months ago by josephsacco

Attachment: Portfile_19.02.1 added

Portfile for version 19.02.1

comment:35 Changed 18 months ago by reneeotten (Renee Otten)

hi Joseph,

I have submitted a PR that (hopefully) integrates your Portfile here with the other, stalled PR. Please give it a try and also let us know if you want to be listed as a maintainer of this port.

Last edited 18 months ago by reneeotten (Renee Otten) (previous) (diff)

comment:36 Changed 18 months ago by josephsacco

Renee,

Listing me as a maintainer is probably a bad idea as I have limited knowledge of development environment for MacPorts. Case in point: It took me a while to locate the Portfile and patch file you submitted [the links in comment #35 did not work for me].

Anyway... I have tried building py-eric-ide. Here is what I have found:

  • port:py${python.version}-qscintilla-qt5

Is listed in the Portfile twice. Remove line 66

  • There is a socket connection problem with the python2 version.
    $ eric6
    Warning: translation file 'qscintilla_en_US'could not be loaded.
    Using default.
    BackgroundService listening on: 62987
    Traceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/eric6/Utilities/BackgroundClient.py", line 209, in <module>
        backgroundClient.run()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/eric6/Utilities/BackgroundClient.py", line 198, in run
        self.connection.shutdown(socket.SHUT_RDWR)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 228, in meth
        return getattr(self._sock,name)(*args)
    socket.error: [Errno 57] Socket is not connected
    

During the initialization, a dialog box pops up with the message

The background client for Python2 disconnected because of an unknown reason.
Should it be restarted?

If you say, "yes", The initialization progresses, until the background client disconnects again, whereupon the dialog reappears. Say "yes" a second time and the initialization progresses further until the background client disconnects again, whereupon the dialog reappears. Say "yes" a third time, and the application launches.

This socket problem occurs when py27-eric6-ide built with +qt4 or +qt5. The socket problem does NOT occur with py37-eric-ide built with either +qt4 or +qt5.

I did not see this problem in the past. What has changed?

I retreated back to earlier versions of eric6: 19.02.1, 19.02, 18.10 and witnessed the same behavior. That leads me to believe the problem is elsewhere:

  • Garbage on my iMac
  • PyQt issues.

When I get some more free cycles I will attempt to isolate the python27 build within a virtual environment. To do that I will need to build PyQt[45] from source, since pip will not install it.

pip install PyQt5
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting PyQt5
  ERROR: Could not find a version that satisfies the requirement PyQt5 (from versions: none)
ERROR: No matching distribution found for PyQt5

-Joseph

comment:37 in reply to:  36 Changed 18 months ago by reneeotten (Renee Otten)

Listing me as a maintainer is probably a bad idea as I have limited knowledge of development environment for MacPorts.

Okay, fair enough.

  • port:py${python.version}-qscintilla-qt5

Is listed in the Portfile twice. Remove line 66

Yep, good point... I'll remove that line.

  • There is a socket connection problem with the python2 version.

I (obviously) do not see that on my machine, otherwise I wouldn't have submitted the PR ;)

Just to be sure, you should start eric6 with eric6-2.7 since the the python-branch is added to the filename. So unless you typed eric6 in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/ or have that directory in your path, I don't know which version of the program you used...

Anyway, if eric6-2.7 gives the same trouble, can you please do:

sudo port uninstall py27-eric-ide
sudo port clean --all py27-eric-ide
sudo port selfupdate
sudo port upgrade outdated
sudo port -dvt install py27-eric-ide +qt5 &> main.log

If the problem persists, please attach the main.log file to this ticket.

comment:38 Changed 18 months ago by reneeotten (Renee Otten)

Cc: reneeotten added

Changed 18 months ago by josephsacco

Attachment: main.log added

Output from 'py27-eric-ide +qt5' build

comment:39 Changed 18 months ago by reneeotten (Renee Otten)

a very similar error is reported upstream; can you also check the eric6_error.log as is mentioned there? The problem there seems to be having multiple version of Qt5 installed; you're not mixing stuff installed through MacPorts with others with pip, right? I don't have time right now, but can look later (if possible also attach the log file from eric6).

comment:40 Changed 18 months ago by josephsacco

Renee,

No... I am not mixing MacPorts installs with pip installs. I do have a number of python virtual environments installed, but the search paths for these environments are not hard wired into my .bash_profile file.

For now, I am willing to conclude there is something amiss on my iMac and roll on. I base this conclusion on an experiment I conducted today:

  • Create a VMware Fusion 11.0.3 OS X 10.14.4 "guest" on my iMac, which is also running OS X 10.14.4
  • Install Xcode
  • Install / Setup latest MacPorts
  • Build / Install py27-eric-ide
  • Launch eric6-2.7
    VmWare:~ jsacco$ eric6-2.7
    Warning: translation file 'qscintilla_en_US'could not be loaded.
    Using default.
    BackgroundService listening on: 49182
    

All is well... Hmm... Yet another mystery to ponder over... :-)

Onwards,

-Joseph

comment:41 Changed 18 months ago by reneeotten (Renee Otten)

Owner: set to reneeotten
Resolution: fixed
Status: newclosed

In 4a7253cfcec282c814f33c6cba40f6c80197eefc/macports-ports (master):

py-eric-ide: new port, version 19.04

Looking at the commit history, upstream seems to intent to package the
software on PyPI as "eric-ide"; hence the choice for the name.

The software has its own install.py script that requires the non-default
setup in the Portfile for build/destroot phases and some patching to get
the App to work.

Closes: #52865
Closes: #56636
Closes: https://github.com/macports/macports-ports/pull/3638

Note: See TracTickets for help on using tickets.