Skip to content

Commit 6e7760d

Browse files
authored
Merge branch 'main' into added_obsolete
2 parents 12bb4a2 + 12b38c4 commit 6e7760d

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

source/guides/analyzing-pypi-package-downloads.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,43 @@ query processes over 500 GB of data.
217217
| 3.5 | 1894153540 |
218218
+--------+---------------+
219219

220+
221+
Getting absolute links to artifacts
222+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
223+
224+
It's sometimes helpful to be able to get the absolute links to download
225+
artifacts from PyPI based on their hashes, e.g. if a particular project or
226+
release has been deleted from PyPI. The metadata table includes the ``path``
227+
column, which includes the hash and artifact filename.
228+
229+
.. note::
230+
The URL generated here is not guaranteed to be stable, but currently aligns with the URL where PyPI artifacts are hosted.
231+
232+
::
233+
234+
SELECT
235+
CONCAT('https://files.pythonhosted.org/packages', path) as url
236+
FROM
237+
`bigquery-public-data.pypi.distribution_metadata`
238+
WHERE
239+
filename LIKE 'sampleproject%'
240+
241+
242+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
243+
| url |
244+
+===================================================================================================================================================================+
245+
| https://files.pythonhosted.org/packages/eb/45/79be82bdeafcecb9dca474cad4003e32ef8e4a0dec6abbd4145ccb02abe1/sampleproject-1.2.0.tar.gz |
246+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
247+
| https://files.pythonhosted.org/packages/56/0a/178e8bbb585ec5b13af42dae48b1d7425d6575b3ff9b02e5ec475e38e1d6/sampleproject_nomura-1.2.0-py2.py3-none-any.whl |
248+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
249+
| https://files.pythonhosted.org/packages/63/88/3200eeaf22571f18d2c41e288862502e33365ccbdc12b892db23f51f8e70/sampleproject_nomura-1.2.0.tar.gz |
250+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
251+
| https://files.pythonhosted.org/packages/21/e9/2743311822e71c0756394b6c5ab15cb64ca66c78c6c6a5cd872c9ed33154/sampleproject_doubleyoung18-1.3.0-py2.py3-none-any.whl |
252+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
253+
| https://files.pythonhosted.org/packages/6f/5b/2f3fe94e1c02816fe23c7ceee5292fb186912929e1972eee7fb729fa27af/sampleproject-1.3.1.tar.gz |
254+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
255+
256+
220257
Caveats
221258
=======
222259

source/guides/distributing-packages-using-setuptools.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ setup.py
5959

6060
The most important file is :file:`setup.py` which exists at the root of your
6161
project directory. For an example, see the `setup.py
62-
<https://github.com/pypa/sampleproject/blob/main/setup.py>`_ in the `PyPA
62+
<https://github.com/pypa/sampleproject/blob/db5806e0a3204034c51b1c00dde7d5eb3fa2532e/setup.py>`_ in the `PyPA
6363
sample project <https://github.com/pypa/sampleproject>`_.
6464

6565
:file:`setup.py` serves two primary functions:
@@ -80,7 +80,7 @@ setup.cfg
8080

8181
:file:`setup.cfg` is an ini file that contains option defaults for
8282
:file:`setup.py` commands. For an example, see the `setup.cfg
83-
<https://github.com/pypa/sampleproject/blob/main/setup.cfg>`_ in the `PyPA
83+
<https://github.com/pypa/sampleproject/blob/db5806e0a3204034c51b1c00dde7d5eb3fa2532e/setup.cfg>`_ in the `PyPA
8484
sample project <https://github.com/pypa/sampleproject>`_.
8585

8686

@@ -157,7 +157,7 @@ specific details of your project are defined.
157157

158158
The most relevant arguments are explained below. Most of the snippets given are
159159
taken from the `setup.py
160-
<https://github.com/pypa/sampleproject/blob/main/setup.py>`_ contained in the
160+
<https://github.com/pypa/sampleproject/blob/db5806e0a3204034c51b1c00dde7d5eb3fa2532e/setup.py>`_ contained in the
161161
`PyPA sample project <https://github.com/pypa/sampleproject>`_.
162162

163163

@@ -669,7 +669,7 @@ Working in "development mode"
669669
You can install a project in "editable"
670670
or "develop" mode while you're working on it.
671671
When installed as editable, a project can be
672-
edited in-place without reinstallation:
672+
edited in-place without reinstallation:
673673
changes to Python source files in projects installed as editable will be reflected the next time an interpreter process is started.
674674

675675
To install a Python package in "editable"/"development" mode

0 commit comments

Comments
 (0)