Any plans for a PyPi distribution?

Asked by Asger Gitz-Johansen

It would be really nice to have this package / functionality be available as a pip-installable package through https://pypi.org/ . It seems like there was an attempt to maintain a package back in 2012 (https://pypi.org/project/python-apt/) but it has been removed since then.

As it is now, it is a bit annoying to have to maintain both a list of apt-package _and_ pip-package dependencies, and I can't list python3-apt as a python dependency to my own wheel (https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html)...

Are there any plans to publish a PyPi distribution of this package? If you need a maintainer for this distribution, I might have some freetime to aid in this effort

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu python-apt Edit question
Assignee:
No assignee Edit question
Solved by:
Bernard Stafford
Solved:
Last query:
Last reply:
Revision history for this message
Bernard Stafford (bernard010) said (last edit ):
#1
Revision history for this message
Asger Gitz-Johansen (sillydan) said :
#2

Hi Bernard,

Thanks for the links, but self-hosting the package won't make it available on pypi.org for public access?

Ideally, I would like to list `python-apt` as a dependency in my `requirements.txt` file, so that it will be installed automatically when you'd install my package with `pip install <my-package>`. Whereas today, I have to instruct users to separately install this package through `apt install` in order to get my package to function properly. Which is a tad annoying.

I understand that due to the nature of the project, the `python-apt` package is dependent on the `apt` binary to exist, and therefore wont work in any given python environment (e.g. the `python-alpine` docker image wont work). But since it has been tried before, I wanted to ask if there are any plans to do it again.

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

You write yourself, that the python-apt (or python3-apt) package depends on apt (which isn't python-based).
So what's the benefit of having python-apt on pypi, if it will not work (without apt)?

(Remark: Ubuntu is quite reluctant with respect to packages installed with pip and recommend installing the *.deb version of any additional python package, if it is available in the Ubuntu repositories.)

Revision history for this message
Asger Gitz-Johansen (sillydan) said :
#4

Hi Manfred,

Thanks for your reply :-)

The benefit is that if you are executing in an environment that does have apt installed, the package could be installed in the same pip command as you install other packages. As an example:

Say I have my package named `foo`. It has the following requirements.txt file:

```
pytest
python3-apt
```
And I publish it to PyPi.org. Then when you `pip install foo`, it would also install the dependencies.
Today, I have to mention in the readme file that `foo`-users will also have to `apt install python3-apt`, which can result in a lot of annoying error reports.

I was thinking that if you install the python-apt pypi package on a system that does not have apt installed, it would simply be that user's problem.

I just wanted clarification if this package would, by some point in the future, endeavor to distribute a PyPi release. And if there aren't any active plans for it, that is completely fine as well.

Revision history for this message
Best Bernard Stafford (bernard010) said (last edit ):
#5
Revision history for this message
Asger Gitz-Johansen (sillydan) said :
#6

Thanks Bernard Stafford, that solved my question.