Open chxp opened 3 years ago
I find a solution! It seems parameter of packages
in function setup
could not recongnize the sub module if you specify the packages
.
So the following changes will work:
from setuptools import setup, find_packages
setup(
name="cmdline-bootstrap",
packages=find_packages(),
entry_points=console_scripts,
version=version,
description="Python command line application bare bones template.",
long_description=long_descr,
author="Jan-Philip Gehrcke",
author_email="jgehrcke@googlemail.com",
url="http://gehrcke.de/2014/02/distributing-a-python-command-line-application",
)
Just replace the packages=["bootstrap"]
by using packages=find_packages()
.
But I still do not know how to really explain the problem and what I need to do if I still want to use packages=["bootstrap"]
.
Thank you for documenting things here @chxp :heart:!
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 )