Skip to content
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

Not pulling profiles when installing via pip? #832

Closed
MattBlack85 opened this issue Jan 2, 2022 · 5 comments · Fixed by #971
Closed

Not pulling profiles when installing via pip? #832

MattBlack85 opened this issue Jan 2, 2022 · 5 comments · Fixed by #971
Labels
blocked-external Blocked by an external dependency bug Something isn't working

Comments

@MattBlack85
Copy link

Hi,

not sure if it's my config or something but it seems that when using pip (for the pypi package and the raw repo) profiles are not packaged and when running archinstall I am not prompted with the choices (Desktop etc.)

Is this expected?

@Torxed
Copy link
Member

Torxed commented Jan 2, 2022

That is unexpected :) It used to be packaged. Most likely it's our switch to pyproject.toml and/or flit that dropped the assets. We'll investigate why this happened.

For reference, these are the lines that are important:

[tool.flit.sdist]
include = ["docs/","profiles"]

For my own sanity, this is how I confirmed this:

anton archinstall]$ sudo pip install .
[sudo] password for anton:
Processing /home/anton/github/archinstall
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: archinstall
  Building wheel for archinstall (PEP 517) ... done
  Created wheel for archinstall: filename=archinstall-2.3.1.dev0-py3-none-any.whl size=112166 sha256=1f11a61ad40018379296963fd90a6a70b4e69dad08ff0d4c301999170c265073
  Stored in directory: /tmp/pip-ephem-wheel-cache-_kxf22l2/wheels/03/1b/18/0ba52054f44b440bd0409993a30fb860d2bac59c4edd6d9d70
Successfully built archinstall
Installing collected packages: archinstall
Successfully installed archinstall-2.3.1.dev0
[anton ~]$ ls -l /usr/lib/python3.10/site-packages/archinstall/
total 16
-rw-r--r-- 1 root root 8578 Jan 14 10:32 __init__.py
drwxr-xr-x 1 root root  428 Jan 14 10:32 lib
-rw-r--r-- 1 root root   78 Jan 14 10:32 __main__.py
drwxr-xr-x 1 root root   96 Jan 14 10:32 __pycache__
>>> import archinstall
>>> archinstall.list_profiles()
{}

Also doesn't work with flit install. Same result.
Despite having the include= for sdist. Perhaps we need to figure out how to include it in wheel and not sdist.

@Torxed Torxed added the bug Something isn't working label Jan 2, 2022
@Torxed Torxed added this to the v2.3.1 milestone Jan 2, 2022
@Torxed
Copy link
Member

Torxed commented Jan 14, 2022

Found the issue, and it seems that flit doesn't follow symlinks (any longer?).
Workaround:

cd ~/archinstall
rm archinstall/examples
rm archinstall/profiles
mv profiles/ archinstall/
mv examples/ archinstall/
pip install .
[anton archinstall]$ ls -l archinstall/
total 16
drwxr-xr-x 1 anton anton  298 Jan 14 08:46 examples
-rw-r--r-- 1 anton anton 8578 Jan 14 08:46 __init__.py
drwxr-xr-x 1 anton anton  428 Jan 14 08:46 lib
-rw-r--r-- 1 anton anton   78 May 28  2021 __main__.py
drwxr-xr-x 1 anton anton  408 Jan 14 08:46 profiles
drwxr-xr-x 1 root  root    92 Oct 22 20:31 __pycache__
pip install .
>>> import archinstall
>>> archinstall.list_profiles()
{'awesome': {'path': '/home/anton/.local/lib/python3.10/site-packages/archinstall/profiles/awesome.py', ...}}

@Torxed Torxed added the blocked-external Blocked by an external dependency label Jan 14, 2022
@Torxed Torxed removed this from the v2.3.1 milestone Jan 25, 2022
@Torxed
Copy link
Member

Torxed commented Jan 25, 2022

I'm still waiting for upstream to fix flit.
I'm removing our milestone of fixing this in time for v2.3.1 so that I can release it tomorrow.

@Torxed
Copy link
Member

Torxed commented Feb 6, 2022

In recent light, a discussion on the flit project issues (522) page the future of flit is being currently discussed, whether to remove or keep the existing build+publish pipeline. Or if flit should become a highly effective but simple builder. In which case we might need to convert our flit pipeline to twine for publishing and pip to install.

I think it's only fair to say that we should be using as much built-in stuff as possible, so perhaps we should beat the gun and swap straight away? I don't see our issue upstream being fixed any time soon.

@dylanmtaylor
Copy link
Contributor

In recent light, a discussion on the flit project issues (522) page the future of flit is being currently discussed, whether to remove or keep the existing build+publish pipeline. Or if flit should become a highly effective but simple builder. In which case we might need to convert our flit pipeline to twine for publishing and pip to install.

I think it's only fair to say that we should be using as much built-in stuff as possible, so perhaps we should beat the gun and swap straight away? I don't see our issue upstream being fixed any time soon.

I think we ought to look into switching build tools sooner rather than later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked-external Blocked by an external dependency bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants