Open anna-hope opened 7 months ago
The import doesn't really work today for setupl.py
based projects, at least not well enough. You probably can make some progress by running rye init --build-system=setuptools
.
@mitsuhiko rye init --build-system=setuptools
has the same issue. But, thank you for clarifying that the import doesn't work at the moment. I'll try to proceed with rye init --no-import
.
I ran into this same issue and was able to use pip
to install setuptools
into the rye
virtual environment located at ~/.rye/self
(at least for me with a default installation).
cd ~/.rye/self
./bin/pip install setuptools
Not ideal to be manually installing packages into the rye
-managed virtual environment, but it did work.
The same as me. And with some research, it seems that it's because setuptools is not been installed when create a venv by default since python 3.12. So is that worth to execute pip install setuptools
automaticlly when we use python3.12
This also happens with python 3.10.
Edit: It seems rye uses 3.12 internally to run rye init
, even if the config.toml contains
[default]
toolchain = "3.10"
What I did was I activated the virtual environment in ~/.rye/self/Scripts and then I ran curl -sSL https://bootstrap.pypa.io/get-pip.py | python
and that installed pip, wheel, and setuptools
You can have it skip wheel by setting the env variable PIP_NO_WHEEL to 1, though. Or you can do curl -sSL https://bootstrap.pypa.io/get-pip.py | python - --no-wheel
Steps to Reproduce
setup.py
filerye init
The
setup.py
is extremely simple:I know the docs say "Note that Rye today does not support setup.py based projects," but also I found this issue, which suggests
rye init
should work in some capacity.I guess
rye init --no-import
could be a workaround, but that would complicate the project setup.I also uninstalled and re-installed Rye to make sure it wasn't some issue with my installation.
Expected Result
The project can be initialized successfully.
Actual Result
Version Info
rye 0.23.0 commit: 0.23.0 (0fdcdda6c 2024-02-13) platform: macos (aarch64) self-python: cpython@3.12 symlink support: true
Stacktrace
No response