-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't install Version 1.2.4 - No module named 'public' #241
Comments
I have created a pull request #242 with a fix for this issue. Adding setup_requires solved the problem, when installing the package.
|
Hmmm... interesting. The documentation explicitly says that pip needs |
Just to add, this is what happened when I tried installing on Ubuntu 18.04 in a new virtualenv:
|
Here's an asciinema recording: |
The problem is, that you are reading the version with This imports the module Using In the future, it's better to refactor the modules an move Single-sourcing the package version: https://packaging.python.org/guides/single-sourcing-package-version/ |
Why does it work on a clean virtualenv then? |
Here's another asciinema recording: https://asciinema.org/a/dxkG88PnxvjVkmC0Htwycql0b You can see me creating a brand new virtualenv, ensure |
I think your This issue seems to have been fixed in setuptools v46.4.0 |
This could be the problem. I will try it on monday, when I'm back at work. |
Thanks for the help |
No problem! :-) This issue made me think though ... it seems that moving After all, it's a version for all aiosmtpd, not just |
Another thing I noticed is that it looks like the root exception was ascii - was your LANG et al not set to utf8? |
This should solve issue aio-libs#241, in which setuptools < 46.4.0 tries to naively import smtp.py (due to version being specified as "attr: aiosmtpd.smtp.__version__" and barfs when encountering "from public import public" Moving __version__ to __init__.py seems to be the wisest -- and most semantically accurate -- decision. Not only can setuptools < 46.4.0 simply do a naive import of __init__.py (which contains no deps), but this signifies the version number applies to the _whole_ aiosmtpd package instead of just the smtp.py module. This impacts the following files * setup.cfg -- scan inside aiosmtpd instead of aiosmtpd.smtp * smtp.py -- it now needs to import * conf.py -- no longer scan smtp.py; import from __init__ instead
To temporarily work around issue aio-libs#241, until a more permanent fix in v1.3.0 Also moved "License" section to its customary place at the end.
* Move __version__ to __init__.py This should solve issue #241, in which setuptools < 46.4.0 tries to naively import smtp.py (due to version being specified as "attr: aiosmtpd.smtp.__version__" and barfs when encountering "from public import public" Moving __version__ to __init__.py seems to be the wisest -- and most semantically accurate -- decision. Not only can setuptools < 46.4.0 simply do a naive import of __init__.py (which contains no deps), but this signifies the version number applies to the _whole_ aiosmtpd package instead of just the smtp.py module. This impacts the following files * setup.cfg -- scan inside aiosmtpd instead of aiosmtpd.smtp * smtp.py -- it now needs to import * conf.py -- no longer scan smtp.py; import from __init__ instead * Add Compatibility Test In this case, ensure __version__ from __init__.py is exact same object as __version__ from smtp.py * Update NEWS.rst
System: CentOS 7
Python Version: 3.6 (from Software Collection)
PIP Version: 21.0.1
Virtualenv: yes
Description:
When I try to install version 1.2.4 from pypi, the install will be discarded and version 1.2.2 is insalled instead.
The reason is, that the module atpuplic is not installed. So the error "ModuleNotFoundError: No module named 'public'" is raised.
Stacktrace:
The text was updated successfully, but these errors were encountered: