diff mbox series

[qemu.qmp,04/12] update project URLs

Message ID 20220422184940.1763958-5-jsnow@redhat.com
State New
Headers show
Series python: fork qemu.qmp python lib into independent repo | expand

Commit Message

John Snow April 22, 2022, 6:49 p.m. UTC
Point to this library's URLs instead of the entire project's.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 setup.cfg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Daniel P. Berrangé April 25, 2022, 10:56 a.m. UTC | #1
On Fri, Apr 22, 2022 at 02:49:32PM -0400, John Snow wrote:
> Point to this library's URLs instead of the entire project's.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  setup.cfg | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/setup.cfg b/setup.cfg
> index c21f2ce..0a1c215 100644
> --- a/setup.cfg
> +++ b/setup.cfg
> @@ -5,8 +5,8 @@ author = QEMU Project
>  author_email = qemu-devel@nongnu.org
>  maintainer = John Snow
>  maintainer_email = jsnow@redhat.com
> -url = https://www.qemu.org/
> -download_url = https://www.qemu.org/download/
> +url = https://gitlab.com/qemu-project/python-qemu-qmp
> +download_url = https://gitlab.com/qemu-project/python-qemu-qmp/-/packages

Auto-generated tarballs are not guaranteed to have fixed content forever
so I tend to avoid pointing to those. Assuming you're intending to upload
to pypi, I'd link to that instead as the "official" tarball source.

>  description = QEMU Monitor Protocol library
>  long_description = file:PACKAGE.rst
>  long_description_content_type = text/x-rst


With regards,
Daniel
John Snow April 25, 2022, 6:19 p.m. UTC | #2
On Mon, Apr 25, 2022, 6:56 AM Daniel P. Berrangé <berrange@redhat.com>
wrote:

> On Fri, Apr 22, 2022 at 02:49:32PM -0400, John Snow wrote:
> > Point to this library's URLs instead of the entire project's.
> >
> > Signed-off-by: John Snow <jsnow@redhat.com>
> > ---
> >  setup.cfg | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/setup.cfg b/setup.cfg
> > index c21f2ce..0a1c215 100644
> > --- a/setup.cfg
> > +++ b/setup.cfg
> > @@ -5,8 +5,8 @@ author = QEMU Project
> >  author_email = qemu-devel@nongnu.org
> >  maintainer = John Snow
> >  maintainer_email = jsnow@redhat.com
> > -url = https://www.qemu.org/
> > -download_url = https://www.qemu.org/download/
> > +url = https://gitlab.com/qemu-project/python-qemu-qmp
> > +download_url =
> https://gitlab.com/qemu-project/python-qemu-qmp/-/packages
>
> Auto-generated tarballs are not guaranteed to have fixed content forever
> so I tend to avoid pointing to those. Assuming you're intending to upload
> to pypi, I'd link to that instead as the "official" tarball source.
>

This metadata will also be used for PyPI, so that seemed cyclic.

I linked it to the gitlab package repository, where I *intend* to push
built wheels (and dev interstitial builds) but maybe that's too "inside
baseball" for a pypi link.

Seems weird for a Pypi package to point to itself on pypi, but maybe that's
correct?



> >  description = QEMU Monitor Protocol library
> >  long_description = file:PACKAGE.rst
> >  long_description_content_type = text/x-rst
>
>
> With regards,
> Daniel
> --
> |: https://berrange.com      -o-
> https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-
> https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-
> https://www.instagram.com/dberrange :|
>
>
Daniel P. Berrangé April 26, 2022, 7:55 a.m. UTC | #3
On Mon, Apr 25, 2022 at 02:19:27PM -0400, John Snow wrote:
> On Mon, Apr 25, 2022, 6:56 AM Daniel P. Berrangé <berrange@redhat.com>
> wrote:
> 
> > On Fri, Apr 22, 2022 at 02:49:32PM -0400, John Snow wrote:
> > > Point to this library's URLs instead of the entire project's.
> > >
> > > Signed-off-by: John Snow <jsnow@redhat.com>
> > > ---
> > >  setup.cfg | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/setup.cfg b/setup.cfg
> > > index c21f2ce..0a1c215 100644
> > > --- a/setup.cfg
> > > +++ b/setup.cfg
> > > @@ -5,8 +5,8 @@ author = QEMU Project
> > >  author_email = qemu-devel@nongnu.org
> > >  maintainer = John Snow
> > >  maintainer_email = jsnow@redhat.com
> > > -url = https://www.qemu.org/
> > > -download_url = https://www.qemu.org/download/
> > > +url = https://gitlab.com/qemu-project/python-qemu-qmp
> > > +download_url =
> > https://gitlab.com/qemu-project/python-qemu-qmp/-/packages
> >
> > Auto-generated tarballs are not guaranteed to have fixed content forever
> > so I tend to avoid pointing to those. Assuming you're intending to upload
> > to pypi, I'd link to that instead as the "official" tarball source.
> >
> 
> This metadata will also be used for PyPI, so that seemed cyclic.
> 
> I linked it to the gitlab package repository, where I *intend* to push
> built wheels (and dev interstitial builds) but maybe that's too "inside
> baseball" for a pypi link.

Oh wait, I mis-understood the URL. If it is the location for manually
built & published dists, that's ok - it isn't the gitlab auto tarballs. 

> Seems weird for a Pypi package to point to itself on pypi, but maybe that's
> correct?

I wonder what common practice is for some popular python libs....

With regards,
Daniel
Kashyap Chamarthy April 26, 2022, 8:16 a.m. UTC | #4
On Tue, Apr 26, 2022 at 08:55:38AM +0100, Daniel P. Berrangé wrote:
> On Mon, Apr 25, 2022 at 02:19:27PM -0400, John Snow wrote:
> > On Mon, Apr 25, 2022, 6:56 AM Daniel P. Berrangé <berrange@redhat.com>
> > wrote:
> > 
> > > On Fri, Apr 22, 2022 at 02:49:32PM -0400, John Snow wrote:
> > > > Point to this library's URLs instead of the entire project's.
> > > >
> > > > Signed-off-by: John Snow <jsnow@redhat.com>
> > > > ---
> > > >  setup.cfg | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/setup.cfg b/setup.cfg
> > > > index c21f2ce..0a1c215 100644
> > > > --- a/setup.cfg
> > > > +++ b/setup.cfg
> > > > @@ -5,8 +5,8 @@ author = QEMU Project
> > > >  author_email = qemu-devel@nongnu.org
> > > >  maintainer = John Snow
> > > >  maintainer_email = jsnow@redhat.com
> > > > -url = https://www.qemu.org/
> > > > -download_url = https://www.qemu.org/download/
> > > > +url = https://gitlab.com/qemu-project/python-qemu-qmp
> > > > +download_url =
> > > https://gitlab.com/qemu-project/python-qemu-qmp/-/packages
> > >
> > > Auto-generated tarballs are not guaranteed to have fixed content forever
> > > so I tend to avoid pointing to those. Assuming you're intending to upload
> > > to pypi, I'd link to that instead as the "official" tarball source.
> > >
> > 
> > This metadata will also be used for PyPI, so that seemed cyclic.
> > 
> > I linked it to the gitlab package repository, where I *intend* to push
> > built wheels (and dev interstitial builds) but maybe that's too "inside
> > baseball" for a pypi link.
> 
> Oh wait, I mis-understood the URL. If it is the location for manually
> built & published dists, that's ok - it isn't the gitlab auto tarballs. 
> 
> > Seems weird for a Pypi package to point to itself on pypi, but maybe that's
> > correct?
> 
> I wonder what common practice is for some popular python libs....

E.g. if you look at SQLAlchemy (definitely one of the popular
libraries), it is pointing to itself (see the Ufiles under the "Download
files" link):

    https://pypi.org/project/SQLAlchemy
John Snow April 26, 2022, 4:38 p.m. UTC | #5
On Tue, Apr 26, 2022 at 4:16 AM Kashyap Chamarthy <kchamart@redhat.com> wrote:
>
> On Tue, Apr 26, 2022 at 08:55:38AM +0100, Daniel P. Berrangé wrote:
> > On Mon, Apr 25, 2022 at 02:19:27PM -0400, John Snow wrote:
> > > On Mon, Apr 25, 2022, 6:56 AM Daniel P. Berrangé <berrange@redhat.com>
> > > wrote:
> > >
> > > > On Fri, Apr 22, 2022 at 02:49:32PM -0400, John Snow wrote:
> > > > > Point to this library's URLs instead of the entire project's.
> > > > >
> > > > > Signed-off-by: John Snow <jsnow@redhat.com>
> > > > > ---
> > > > >  setup.cfg | 4 ++--
> > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/setup.cfg b/setup.cfg
> > > > > index c21f2ce..0a1c215 100644
> > > > > --- a/setup.cfg
> > > > > +++ b/setup.cfg
> > > > > @@ -5,8 +5,8 @@ author = QEMU Project
> > > > >  author_email = qemu-devel@nongnu.org
> > > > >  maintainer = John Snow
> > > > >  maintainer_email = jsnow@redhat.com
> > > > > -url = https://www.qemu.org/
> > > > > -download_url = https://www.qemu.org/download/
> > > > > +url = https://gitlab.com/qemu-project/python-qemu-qmp
> > > > > +download_url =
> > > > https://gitlab.com/qemu-project/python-qemu-qmp/-/packages
> > > >
> > > > Auto-generated tarballs are not guaranteed to have fixed content forever
> > > > so I tend to avoid pointing to those. Assuming you're intending to upload
> > > > to pypi, I'd link to that instead as the "official" tarball source.
> > > >
> > >
> > > This metadata will also be used for PyPI, so that seemed cyclic.
> > >
> > > I linked it to the gitlab package repository, where I *intend* to push
> > > built wheels (and dev interstitial builds) but maybe that's too "inside
> > > baseball" for a pypi link.
> >
> > Oh wait, I mis-understood the URL. If it is the location for manually
> > built & published dists, that's ok - it isn't the gitlab auto tarballs.
> >
> > > Seems weird for a Pypi package to point to itself on pypi, but maybe that's
> > > correct?
> >
> > I wonder what common practice is for some popular python libs....
>
> E.g. if you look at SQLAlchemy (definitely one of the popular
> libraries), it is pointing to itself (see the Ufiles under the "Download
> files" link):
>
>     https://pypi.org/project/SQLAlchemy
>

The "Files" link is, I believe, just a standard PyPI link. "Download"
is the one being defined here.

Check out my "Alpha 0" page, generated earlier this year:
https://pypi.org/project/qemu.qmp/
Download Files goes to the PyPI section, but "Download" goes to the
GitLab package registry.

I think I'll leave this as-is, then.

--js
Beraldo Leal April 29, 2022, 2:06 p.m. UTC | #6
On Fri, Apr 22, 2022 at 02:49:32PM -0400, John Snow wrote:
> Point to this library's URLs instead of the entire project's.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  setup.cfg | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/setup.cfg b/setup.cfg
> index c21f2ce..0a1c215 100644
> --- a/setup.cfg
> +++ b/setup.cfg
> @@ -5,8 +5,8 @@ author = QEMU Project
>  author_email = qemu-devel@nongnu.org
>  maintainer = John Snow
>  maintainer_email = jsnow@redhat.com
> -url = https://www.qemu.org/
> -download_url = https://www.qemu.org/download/
> +url = https://gitlab.com/qemu-project/python-qemu-qmp
> +download_url = https://gitlab.com/qemu-project/python-qemu-qmp/-/packages

Afaik (and I might be wrong), it seems that download_url is not
recommended nowadays. External downloads got removed due to some abuse
and problems.

I remember reading about some changes in the distribution of Python
packages in PyPi where, by default, PyPi will not parse and expose
"download_url" for newly registered packages anymore. From PEP438:

"Many package uploaders are not aware that specifying the “homepage” or
“download-url” in their package metadata will needlessly slow down the
installation process for all users."

Please take this comment with a grain of salt, I'm not 100% sure about
this and I might be missing something.

--
Beraldo
John Snow April 29, 2022, 3:48 p.m. UTC | #7
On Fri, Apr 29, 2022 at 10:06 AM Beraldo Leal <bleal@redhat.com> wrote:
>
> On Fri, Apr 22, 2022 at 02:49:32PM -0400, John Snow wrote:
> > Point to this library's URLs instead of the entire project's.
> >
> > Signed-off-by: John Snow <jsnow@redhat.com>
> > ---
> >  setup.cfg | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/setup.cfg b/setup.cfg
> > index c21f2ce..0a1c215 100644
> > --- a/setup.cfg
> > +++ b/setup.cfg
> > @@ -5,8 +5,8 @@ author = QEMU Project
> >  author_email = qemu-devel@nongnu.org
> >  maintainer = John Snow
> >  maintainer_email = jsnow@redhat.com
> > -url = https://www.qemu.org/
> > -download_url = https://www.qemu.org/download/
> > +url = https://gitlab.com/qemu-project/python-qemu-qmp
> > +download_url = https://gitlab.com/qemu-project/python-qemu-qmp/-/packages
>
> Afaik (and I might be wrong), it seems that download_url is not
> recommended nowadays. External downloads got removed due to some abuse
> and problems.
>
> I remember reading about some changes in the distribution of Python
> packages in PyPi where, by default, PyPi will not parse and expose
> "download_url" for newly registered packages anymore. From PEP438:
>
> "Many package uploaders are not aware that specifying the “homepage” or
> “download-url” in their package metadata will needlessly slow down the
> installation process for all users."
>
> Please take this comment with a grain of salt, I'm not 100% sure about
> this and I might be missing something.
>

Neat. Good reference on PEP438. It was superseded:
https://peps.python.org/pep-0470/ ... but I am under the impression
that pip does not have this behavior anymore. Maybe I'm wrong? I
wasn't writing Python in 2014.

Though, I didn't realize that this field was *ever* used for external
download links by package managers. Fun. I'll have to do some reading,
but maybe I'll just remove the field for now, thanks for bringing this
to my attention.

--js
diff mbox series

Patch

diff --git a/setup.cfg b/setup.cfg
index c21f2ce..0a1c215 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,8 +5,8 @@  author = QEMU Project
 author_email = qemu-devel@nongnu.org
 maintainer = John Snow
 maintainer_email = jsnow@redhat.com
-url = https://www.qemu.org/
-download_url = https://www.qemu.org/download/
+url = https://gitlab.com/qemu-project/python-qemu-qmp
+download_url = https://gitlab.com/qemu-project/python-qemu-qmp/-/packages
 description = QEMU Monitor Protocol library
 long_description = file:PACKAGE.rst
 long_description_content_type = text/x-rst