Skip to content

Commit

Permalink
Update setup.py to expose scripts/* as CLI entrypoints.
Browse files Browse the repository at this point in the history
This allows build systems like [Pants](https://www.pantsbuild.org/docs/reference-pex_binary#codescriptcode)
to more easily package this software and create executable binaries from
its scripts.
  • Loading branch information
kkchau committed Feb 2, 2023
1 parent 1b18e78 commit 5d77953
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/create_db.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import argparse
import gffutils

Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import setuptools
from glob import glob
from os.path import dirname, join

DIR = (dirname(__file__) or '.')

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
Expand All @@ -19,5 +23,6 @@
"console_scripts": [
"pangolin=pangolin.pangolin:main"
]
}
},
scripts=glob(join(DIR, 'scripts/*.py')),
)

0 comments on commit 5d77953

Please sign in to comment.