| 1 |
Description: Use system pint package instead of vendored copy |
| 2 |
The vendored pint directory is excluded from the Debian source tarball |
| 3 |
via Files-Excluded. This patch updates imports and dependencies to use |
| 4 |
the system python3-pint package. |
| 5 |
. |
| 6 |
Changes include: |
| 7 |
- Change imports from datasette.vendored.pint to system pint |
| 8 |
- Update setup.py to depend on pint>=0.24.3 |
| 9 |
- Remove vendored Pint dependencies (platformdirs, typing_extensions, etc) |
| 10 |
- Add .gitlab-ci.yml for Salsa CI |
| 11 |
Author: Mahangu Weerasinghe <[email protected]> |
| 12 |
Bug-Debian: https://bugs.debian.org/1120835 |
| 13 |
Forwarded: not-needed |
| 14 |
--- /dev/null |
| 15 |
+++ b/.gitlab-ci.yml |
| 16 |
@@ -0,0 +1,2 @@ |
| 17 |
+include: |
| 18 |
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml |
| 19 |
--- a/datasette/views/base.py |
| 20 |
+++ b/datasette/views/base.py |
| 21 |
@@ -8,7 +8,7 @@ import urllib |
| 22 |
from markupsafe import escape |
| 23 |
|
| 24 |
|
| 25 |
-from datasette.vendored import pint |
| 26 |
+import pint |
| 27 |
|
| 28 |
from datasette import __version__ |
| 29 |
from datasette.database import QueryInterrupted |
| 30 |
--- a/tests/plugins/my_plugin.py |
| 31 |
+++ b/tests/plugins/my_plugin.py |
| 32 |
@@ -5,7 +5,7 @@ from datasette import tracer |
| 33 |
from datasette.utils import path_with_added_args |
| 34 |
from datasette.utils.asgi import asgi_send_json, Response |
| 35 |
import base64 |
| 36 |
-from datasette.vendored import pint |
| 37 |
+import pint |
| 38 |
import json |
| 39 |
|
| 40 |
ureg = pint.UnitRegistry() |
| 41 |
--- a/setup.py |
| 42 |
+++ b/setup.py |
| 43 |
@@ -39,7 +39,7 @@ setup( |
| 44 |
}, |
| 45 |
packages=find_packages(exclude=("tests",)), |
| 46 |
package_data={ |
| 47 |
- "datasette": ["templates/*.html", "vendored/**/*.txt"], |
| 48 |
+ "datasette": ["templates/*.html"], |
| 49 |
}, |
| 50 |
include_package_data=True, |
| 51 |
python_requires=">=3.10", |
| 52 |
@@ -60,11 +60,7 @@ setup( |
| 53 |
"itsdangerous>=1.1", |
| 54 |
"setuptools", |
| 55 |
"pip", |
| 56 |
- # Needed by our vendored Pint: |
| 57 |
- "platformdirs>=2.1.0", |
| 58 |
- "typing_extensions>=4.0.0", |
| 59 |
- "flexcache>=0.3", |
| 60 |
- "flexparser>=0.3", |
| 61 |
+ "pint>=0.24.3", |
| 62 |
], |
| 63 |
entry_points=""" |
| 64 |
[console_scripts] |