You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to write a small personal package based on your scripts.
The structure of the directory is showed here:
I further add a new module (src) and script (case.py) under bootstrap fold like this:
When I execute python setup.py install and run cccase in the terminal after installation, it shows the error:
Traceback (most recent call last):
File "/home/chxp/tmp/python3-test/bin/cccase", line 11, in <module>
load_entry_point('cmdline-bootstrap==0.2.0', 'console_scripts', 'cccase')()
File "/home/chxp/tmp/python3-test/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/chxp/tmp/python3-test/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
return ep.load()
File "/home/chxp/tmp/python3-test/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/home/chxp/tmp/python3-test/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'bootstrap.src'
It works fine if I use ./bootstrap-runner.py or python -m bootstrap (I modify them also), I think it may a mistake in the setup.py.
Thus, how do I revise the setup.py? I want to generate different command-line applications in a python package.
Meanwhile, how do I test multiple command-line applications by using ./bootstrap-runner.py or python -m bootstrap in a single run.
It seems I need to change the content in __main__.py or bootstrap-runner.py to test each command-line application, such as bootstrap, cccase.
I want to write a small personal package based on your scripts.
The structure of the directory is showed here:
I further add a new module (
src
) and script (case.py
) under bootstrap fold like this:the content of
case.py
showed below:I add the following lines into the setup.py:
When I execute
python setup.py install
and runcccase
in the terminal after installation, it shows the error:It works fine if I use
./bootstrap-runner.py
orpython -m bootstrap
(I modify them also), I think it may a mistake in thesetup.py
.Thus, how do I revise the setup.py? I want to generate different command-line applications in a python package.
Meanwhile, how do I test multiple command-line applications by using
./bootstrap-runner.py
orpython -m bootstrap
in a single run.It seems I need to change the content in
__main__.py
orbootstrap-runner.py
to test each command-line application, such asbootstrap
,cccase
.The original scripts are upload at " https://gitee.com/chxp/python-cmdline-bootstrap " and download by
git clone https://gitee.com/chxp/python-cmdline-bootstrap.git
.Thanks for your help. (I also asked it on Stackoverflow: https://stackoverflow.com/questions/66954048/how-to-write-the-accurate-setup-pyentry-points-when-i-want-to-generate-multi )
The text was updated successfully, but these errors were encountered: