jyn514 / GradeForge

Courses available from my.sc.edu
GNU General Public License v3.0
1 stars 0 forks source link

setup.py does not specify entry_points #38

Closed charlesdaniels closed 6 years ago

charlesdaniels commented 6 years ago

Since we are already using setup.py, we should use entry points for all installed scripts. Entry points allow one or more "main" functions to be connected to commands in $PATH autoamtically by setup.py install. Here is an example from a recent project of mine:

    entry_points = {
        'console_scripts': ['quadp-cli=quadp.cli:main']
    }

Here is a stackoverflow post with more details.

I am capable of implementing this myself as soon as @jyn514 can enumerate a list of desired entry points.

jyn514 commented 6 years ago

Hmm, there's not really a single function which handles this. is there a way to specify all of __main__.py as an entry point?

jyn514 commented 6 years ago

I think pkg_resources.EntryPoint might do what we want, testing now

jyn514 commented 6 years ago

Done in https://github.com/jyn514/GradeForge/commit/ef7e556aeef41fb238ad56bd5ca3ce14f083c17d, it ended up being easier than I thought