If you get that error, it means you're not actually using python 3 to
run setup.py.
15.04.2016, 09:52, Luís de Sousa via Distutils-SIG kirjoitti:
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')
The __init__.py file is empty, by the way. Any other hints?
Thank you,
Luís
/Sent from ProtonMail <https://protonmail.ch>, encrypted email based
in Switzerland./
-------- Original Message --------
Subject: Re: [Distutils] 'Invalid module name' creating package with
setuptools
Local Time: April 15, 2016 8:24 AM
UTC Time: April 15, 2016 6:24 AM
From: mar...@gedmin.as
To: distutils-sig@python.org
On Thu, Apr 14, 2016 at 11:28:09AM -0400, Luís de Sousa via
Distutils-SIG wrote:
> I have a project with these contents:
>
> proj
> ├── proj
> │ ├── scriptA.py
> │ ├── scriptB.py
> │ └── __init__.py
> ├── LICENCE
> ├── README.md
> └── setup.py
>
> The setup.py file looks like:
...
> entry_points={
> 'console_scripts': [
> 'scriptA=proj:scriptA',
> 'scriptB=proj:scriptB'
I'm not sure this is right -- an entry point should point to a python
module (not a package) and a function in that module, so something like
'scriptA=proj.scriptA:main',
'scriptB=proj.scriptB:main',
I've never tried to define entry points pointing to functions defined in
the __init__.py of a package, so I don't know if you're allowed to write
scriptX=proj:fn
or if you have to explicitly say
scriptX=proj.__init__:fn
> When I try to build I get the following error:
>
> $ python setup.py bdist_wheel --universal
> error in proj setup command: ('Invalid module name', 'proj')
(That is not a good error message indeed.)
Marius Gedminas
--
This loads a GDT entry into the "Task Register": that entry points to a
structure called the Task State Segment. Some comments scattered
though the
kernel code indicate that this used for task switching in ages past,
along
with blood sacrifice and astrology.
-- lguest source code
_______________________________________________
Distutils-SIG maillist - Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig
_______________________________________________
Distutils-SIG maillist - Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig
_______________________________________________
Distutils-SIG maillist - Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig