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

PKG: Use entry_points to create PsychoPy executable #2182

Merged
merged 3 commits into from Jan 9, 2019

Conversation

Projects
None yet
4 participants
@hoechenberger
Copy link
Member

hoechenberger commented Jan 4, 2019

This automatically creates an executable with the right interpreter, in the right place, on all platforms. It's essentially the recommended modern-day replacement for the currently used scripts directive.

This is also going to help us provide conda packages, as conda-build also supports a similar
directive
, even for platform-independent (noarch) packages, and ensures the script is run via python.app on macOS if desired.

This PR

  • gets rid of the outdated scripts directive (it's a disutils thing) for creating the PsychoPy executable
  • renames the created executable from previously psychopyApp to psychopy, which, I believe, makes more sense. So now on Linux and macOS, one can start PsychoPy simply by typing psychopy after installation. (I checked the docs and believe they do not need updating)

There's still that psychopy_post_inst.py script, but I believe it's not being used anymore? Can we not just drop it?

Richard Höchenberger
PKG: Use entry_points to create PsychoPy executable
This automatically creates an executable with the right interpreter,
in the right place, on all platforms. This is also going to help us
provide `conda` packages, as `conda-build` also supports a similar
directive, even for platform-independent (`noarch`) packages, and
ensures the script is run via `python.app` on macOS if desired.

https://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation
https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#python-entry-points
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 4, 2019

Codecov Report

Merging #2182 into master will decrease coverage by <.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2182      +/-   ##
==========================================
- Coverage   42.93%   42.92%   -0.01%     
==========================================
  Files         221      221              
  Lines       38115    38117       +2     
  Branches     6548     6548              
==========================================
- Hits        16364    16362       -2     
- Misses      20197    20202       +5     
+ Partials     1554     1553       -1
Impacted Files Coverage Δ
psychopy/app/psychopyApp.py 11.62% <33.33%> (+1.87%) ⬆️
psychopy/app/coder/coder.py 28.29% <0%> (-0.19%) ⬇️

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 4e980da...d34d227. Read the comment docs.

@coveralls

This comment has been minimized.

Copy link

coveralls commented Jan 4, 2019

Coverage Status

Coverage decreased (-0.01%) to 47.006% when pulling a3bb53d on hoechenberger:entry-points into 4e980da on psychopy:master.

@peircej

This comment has been minimized.

Copy link
Member

peircej commented Jan 4, 2019

Yes, I think all that's fine. The post-install was useful in the days of setup.py install to add a start-menu item but has never been supported by pip, sadly, so may as well delete.

@hoechenberger

This comment has been minimized.

Copy link
Member Author

hoechenberger commented Jan 4, 2019

The post-install was useful in the days of setup.py install to add a start-menu item but has never been supported by pip, sadly, so may as well delete.

This is something that can apparently be solved via conda, too :)
conda/constructor#38 (comment)

Richard Höchenberger added some commits Jan 4, 2019

@peircej

This comment has been minimized.

Copy link
Member

peircej commented Jan 4, 2019

This pull request fixes 1 alert when merging a3bb53d into b75b813 - view on LGTM.com

fixed alerts:

  • 1 for Except block handles 'BaseException'

Comment posted by LGTM.com

@peircej peircej merged commit 79af98a into psychopy:master Jan 9, 2019

2 checks passed

LGTM analysis: Python 1 fixed alert
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@hoechenberger hoechenberger deleted the hoechenberger:entry-points branch Jan 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment