gui_scripts entry point on Mac for wxpython 4.0.0a3

Hi, I have tried and failed to use the gui_scripts entry point in setup.py (using setuprools) on MacOSX.
This works on Linux and Windows, but not on Mac. I think it was an issue of using python instead of pythonw.

I do not remember if this was ultimately an issue with wxpython, setuptools or Anaconda (I was trying to make a cross platform wxpython package for Anaconda).

Does anyone know if this has been resolved?

I do not have a Mac so I can’t test it very easily.

/bjorn

Hi Bjorn,

···

On Fri, Jun 30, 2017 at 1:16 AM, Björn Johansson bjornjobb@gmail.com wrote:

Hi, I have tried and failed to use the gui_scripts entry point in setup.py (using setuprools) on MacOSX.
This works on Linux and Windows, but not on Mac. I think it was an issue of using python instead of pythonw.

I do not remember if this was ultimately an issue with wxpython, setuptools or Anaconda (I was trying to make a cross platform wxpython package for Anaconda).

I do not use setuptools ‘entry_points’ myself. My understanding was that they were intended for plugin mechanisms so that one package could find another package if they both agree to use ‘entry_points’ instead of the typical “try import” method. But, I also admit that there is much in setuptools I do not fully understand.

But, if you are trying to register runnable scripts on Mac OSX with Anaconda Python, then the scripts definitely need to be run with pythonw. This is Anaconda vs wxPython, and is entirely ContinuumIO’s choice. They know about the problem, know that simple solutions exist, and do not care to solve it. Please complain to ContinuumIO.

Does anyone know if this has been resolved?

Anaconda vs wxPython is still a problem.

I do not have a Mac so I can’t test it very easily.

When my packages need to install runnable scripts, including wx-based GUIs, I use
setup(…, data_files = list_of_files, …)

For linux and Mac, these go to ‘bin’, on Windows to ‘scripts’. For some projects, I also make (from within setup.py, after installation) desktop icons (on Windows) and little Apps that use bash to run the script on Macs.

I guess that’s to say: I do these steps without relying on setuptools.

–Matt

I do not use setuptools 'entry_points' myself. My understanding was that
they were intended for plugin mechanisms so that one package could find
another package if they both agree to use 'entry_points' instead of the
typical "try import" method. But, I also admit that there is much in
setuptools I do not fully understand.

well, entry_points is also used for making top-level executables...

there is much in setuptools that I don't understand at all :slight_smile: -- it's a
mess.

But, if you are trying to register runnable scripts on Mac OSX with
Anaconda Python, then the scripts definitely need to be run with pythonw.
This is Anaconda vs wxPython, and is entirely ContinuumIO's choice. They
know about the problem, know that simple solutions exist, and do not care
to solve it. Please complain to ContinuumIO.

the solution is not THAT simple, but yes, a Soutilon exists, and Contimuum
hasn't done antyihng about it. If you want to do somethning about it, and
have any fluency with configure scripts, etc, then you could do that fix
and constirubte it to conda-forge -- where it then *might* get picked up by
continuum...

But it's also a setuptools, bug, and They don't seem interested in fixing
it either -- i.e. "pythonw" has existed for many years, and gui_scripts
SHOULD use it.

sigh.

But, as Matt says, you should be able to get it o work by writing your
top-level script by hand to use pythonw

-CHB

···

On Fri, Jun 30, 2017 at 5:25 AM, Matt Newville <newville@cars.uchicago.edu> wrote:

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov