[Distutils] 'Invalid module name' creating package with setuptools
Nathaniel Smith
njs at pobox.com
Fri Apr 15 11:04:27 EDT 2016
On Apr 14, 2016 11:52 PM, "Luís de Sousa" <distutils-sig at python.org> wrote:
>
> Hi Marius, thank you for the reply.
>
> If I remove the line # coding=utf8, I get the following error:
>
> $ python setup.py bdist_wheel --universal
> File "setup.py", line 18
> SyntaxError: Non-ASCII character '\xc3' in file setup.py on line 18, but
no encoding declared; see http://www.python.org/peps/pep-0263.html for
details
>
> I created main functions in each of these scripts and altered the entry
points bit to:
>
> entry_points={
> 'console_scripts': [
> 'scriptA=proj:scriptA:main',
> 'scriptB=proj:scriptB:main'
> ],
> },
>
> This way I get this error:
>
> $ python setup.py bdist_wheel --universal
> error in proj setup command: ("EntryPoint must be in 'name=module:attrs
[extras]' format", 'scriptA=proj:scriptA:main')
Here your problem is that entry points should have only one : in them. You
want
proj.scriptA:main
(This means: do 'import proj.scriptA', then call 'proj.scriptA.main'. You
can have as many dots as you want on either side of the :, and the colon
marks how much of your dotted string gets passed to 'import'.)
-n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160415/c0ef8ebe/attachment.html>
More information about the Distutils-SIG
mailing list