infolab-csail/wikimap

entry_point console_scripts can't take command line arguments

Closed this issue · 4 comments

Since @fakedrake's pull request #1, I have been struggling with getting the console_scripts that are denoted as entry_points in the setup.py to take command line arguments necessary to specify file paths. I don't want to have a workaround where I allow default file paths, I would rather have a way to pass command line arguments directly to the console_scripts. Obviously, I can just invoke the scripts directly from source using python <scriptname>, but I thought I would try the package-style Chris proposed.

Branch entry_points contains my attempt to fix this, but I am stuck. After updating the names of the scripts, I followed this Stack Overflow suggestion to use the argparse Python package, but that did not fix the problem (see commit 10d024f).

Still looking for some way to pass arguments to the console_scripts. This is a work-in-progress, so help/suggestions are appreciated.

Being dealt with on PR #3, will delete branch entry_points.

FYI the entry_points branch still exists in the remote. To delete a branch that has been pushed to origin, it's a two-step process.

$ git branch -D entry_points          # delete branch locally
$ git push origin :entry_points       # delete branch in origin

Thanks for the reminder. I'm going to leave it until cli-entrypoint branch is merged (just in case for reference sake), which will probably happen soon.

Deleted branch entry_points now that branch cli-entrypoint, which solves this issue, is merged.