django-material-design-icons 0.0.1.dev1__tar.gz → 0.0.1.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/PKG-INFO +1 -1
- {django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/build.py +20 -1
- {django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/pyproject.toml +1 -1
- {django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/setup.py +1 -1
- django_material_design_icons-0.0.1.dev2/src/django_mdi/__init__.py +3 -0
- django_material_design_icons-0.0.1.dev2/src/django_mdi/icons/default.whl +0 -0
- {django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/src/django_mdi/icons/default.zip +0 -0
- django_material_design_icons-0.0.1.dev2/src/django_mdi/icons/light.zip +0 -0
- {django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/src/django_mdi/lib.py +3 -3
- django_material_design_icons-0.0.1.dev1/src/django_mdi/__init__.py +0 -3
- {django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/LICENCE +0 -0
- {django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/README.md +0 -0
- {django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/src/django_mdi/icons/__init__.py +0 -0
- /django_material_design_icons-0.0.1.dev1/src/django_mdi/icons/light.zip → /django_material_design_icons-0.0.1.dev2/src/django_mdi/icons/light.whl +0 -0
- {django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/src/django_mdi/py.typed +0 -0
- {django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/src/django_mdi/templatetags/__init__.py +0 -0
- {django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/src/django_mdi/templatetags/material_design_icons.py +0 -0
{django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/build.py
RENAMED
|
@@ -6,18 +6,37 @@ personal mdi theme if you want.
|
|
|
6
6
|
The `build` function is a required function of poetry to create the package bundle
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
+
import atexit
|
|
9
10
|
import logging
|
|
11
|
+
import subprocess
|
|
10
12
|
import sys
|
|
11
13
|
import zipfile
|
|
12
14
|
from multiprocessing.pool import ThreadPool
|
|
13
15
|
from pathlib import Path
|
|
14
|
-
from typing import Final
|
|
16
|
+
from typing import Final, Literal
|
|
17
|
+
|
|
15
18
|
|
|
16
19
|
logger: logging.Logger = logging.getLogger(__name__)
|
|
17
20
|
logger.addHandler(logging.StreamHandler(sys.stdout))
|
|
18
21
|
logger.setLevel(logging.INFO)
|
|
19
22
|
|
|
20
23
|
|
|
24
|
+
DIST_PATH: Final[Path] = Path("dist/")
|
|
25
|
+
|
|
26
|
+
def pypi_fix_target_wheel():
|
|
27
|
+
"""Fix the PyPI
|
|
28
|
+
|
|
29
|
+
Caused by: Upload failed with status code 400 Bad Request
|
|
30
|
+
Server says: 400 Binary wheel '<package name>-cp312-cp312-linux_x86_64.whl' has an unsupported platform tag 'linux_x86_64'.
|
|
31
|
+
"""
|
|
32
|
+
for wheel in DIST_PATH.glob("*-linux_x86_64.whl"):
|
|
33
|
+
logger.info("Fixing %s", wheel)
|
|
34
|
+
subprocess.run(
|
|
35
|
+
["uvx", "wheel", "tags", "--python-tag=py3", "--abi-tag=none", "--platform-tag=any", "--remove", wheel],
|
|
36
|
+
check=False,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
21
40
|
THEME_DIR: Final[Path] = Path("src/django_mdi/icons")
|
|
22
41
|
THEME_DIR.mkdir(parents=True, exist_ok=True)
|
|
23
42
|
|
{django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/setup.py
RENAMED
|
@@ -15,7 +15,7 @@ extras_require = \
|
|
|
15
15
|
|
|
16
16
|
setup_kwargs = {
|
|
17
17
|
'name': 'django-material-design-icons',
|
|
18
|
-
'version': '0.0.1.
|
|
18
|
+
'version': '0.0.1.dev2',
|
|
19
19
|
'description': 'Material Design Icon python package primarily for Django applications',
|
|
20
20
|
'long_description': '# Django MDI\n\n\nPackage of icons from **Material Design Icons +light** for the web framework **Django**.\n\n\n> All icons included in this python package is works of the project [Pictogrammers](https://pictogrammers.com/)\'s designers & collaborators, than creating and maintain this icons in a way thats is open and accessible to everyone ♥️.\n\n\n## 📄 Documentation translations\n\n- [Spanish - Español 🇪🇸](./README.es-ES.md)\n\n\n## 📦 Installation\n\n### 🐍 From PyPI\n\nThis is the common form to install this package:\n\n```shell\npip install django-mdi\n```\n\nIn case that the PyPI have problems or you need to work offline you can use the next method.\n\n\n### 🏠 From the repository\n\nTo install the package from a published version you can execute the next command.\n\n```shell\n# Change the \'main\' word to the published version that want to install\n$ pip install https://codeberg.org/IndustrialRabbit/django-mdi/archive/main.tar.gz\n```\n\n\n> [!TIP] Council\n> If you can not install online the package you can download first the .tar.gz archive and next execute the pip command without needed internet connection.\n\n---\n\nYo can also installed it using a git-branch name or commit but (_it is not recommended_ 🫣)\n\n```shell\n# Change the \'main\' word to the branch name or commit that want to install\npip install git+https://codeberg.org/IndustrialRabbit/django-mdi.git@main\n```\n\n## 📘 Usage manual\n\nTo usage it you was need to have a Django application created. Next need to go in the Django settings and where you have the `INSTALLED_APPS` add the package key name `"django_mdi"`.\n\n```python\nINSTALLED_APPS = [\n ...\n "django_mdi",\n ...\n]\n```\n\nAfter registered the python package as Django application, in the same place, you must go to `TEMPLATES` setting and within the `OPTIONS` part add a `builtins` key with the value `"django_mdi.templatetags.material_design_icons"`.\n\n\n```python\nTEMPLATES = [\n {\n ...\n "BACKEND": "django.template.backends.django.DjangoTemplates",\n ...\n "OPTIONS": {\n ...\n "builtins": [\n ...\n "django_mdi.templatetags.material_design_icons",\n ...\n ],\n ...\n },\n },\n]\n```\n\n> [!NOTE]\n> It has been tested with the official Django template engine `"django.template.backends.django.DjangoTemplates"`. If you change it ensure that you do not break the functionality.\n\n\nWith the previous done you can starting to using it. For that go to (.hml/.html/.j2) file and add on the header `{% load material_design_icons %}`.\n\n\n\n```jinja\n... <!--Other resources to load before -->\n{% load material_design_icons %}\n\n<!DOCTYPE html>\n... <!-- you HTML web page document -->\n```\n\nThis ony is necessary to declared once since in the common file `base.html` or when you see is better place to use it.\n\n\n\n## ✏️ Syntax\n\n\nThe syntax is the next:\n\n\n```abnf\n; ------------------------ TAG ------------------------\n; The tag that ever this package use \'mdi\'\ntag = "{% mdi" 1*WSP icon-name *(1*WSP options) 1*WSP "%}"\n; read the README.md#-Icons\nicon-name = STRING\n\n; --------------------- OPTIONS ----------------------\n; The options can been in any order one prefers, provided that none are repeated\noptions = size / theme-flag / kwargs\n\n; The size will be used for both `hight` and `width`\nsize = "size=" 1*DIGIT ; unsigned int | >=0\n\n; The theme-flag mark specifies which icon theme are going to search for and load.\n; By default it selects the \'default\' theme or the `light` version if `MDI_DEFAULT_LIGHT=True` is set.\ntheme-flag = default / light ; for the moment is light or default\n\n; The rest of key-values that will loading inside of the icon <svg> tag for example: `class="align-middle"` to add the style `vertical-aligment: middle` from bootstrap ~v5 in the icon.\nkwargs = key "=" value\n```\n\n\n### Examples\n\n```html\n{% mdi carrot size=24 style="color: orange;" %}\n```\n\n<svg xmlns="http://www.w3.org/2000/svg" id="mdi-carrot" height=24 width=24 style="color: orange;" viewBox="0 0 24 24"><path d="M16,10L15.8,11H13.5A0.5,0.5 0 0,0 13,11.5A0.5,0.5 0 0,0 13.5,12H15.6L14.6,17H12.5A0.5,0.5 0 0,0 12,17.5A0.5,0.5 0 0,0 12.5,18H14.4L14,20A2,2 0 0,1 12,22A2,2 0 0,1 10,20L9,15H10.5A0.5,0.5 0 0,0 11,14.5A0.5,0.5 0 0,0 10.5,14H8.8L8,10C8,8.8 8.93,7.77 10.29,7.29L8.9,5.28C8.59,4.82 8.7,4.2 9.16,3.89C9.61,3.57 10.23,3.69 10.55,4.14L11,4.8V3A1,1 0 0,1 12,2A1,1 0 0,1 13,3V5.28L14.5,3.54C14.83,3.12 15.47,3.07 15.89,3.43C16.31,3.78 16.36,4.41 16,4.84L13.87,7.35C15.14,7.85 16,8.85 16,10Z" /></svg>\n\n\n## ⚙️ Configuration\n\nTo configure the package \'_same as the rest of apps_\' you need yo go to ever in the settings path of you project, when you will be able to modifies the following aspects.\n\n### Set all icons light by default\n\nTo set `Material Design Icons Light` as the default theme wiouth need to set `light` in any icon (see [syntax](README.md#️-syntax)). You must add the key `MDI_DEFAULT_LIGHT`.\n\n```python\n...\nMDI_DEFAULT_LIGHT=True # by default is False, you can set it as string like "true".\n...\n```\n\n\n## 🖼️ Icons\n\n> [!NOTE]\n> It\'s possible that some `default` icons are bot exist in the `light` theme.\n\nThe list of icons that the package including currently are the next:\n\n- **Default v7.4.47** : https://pictogrammers.com/library/mdi/version/7.4.47\n- **Light v0.2.63** : https://pictogrammers.com/library/mdil/version/0.2.63\n\n\n\n## 🛠️ Maintenance Status\n\nDue to the limited time I have, this package will receive updates **every 3 months** for maintenance and security reasons as well as synchronizing the catalog.\n\nFor the moment my approach is divided into thre parts:\n\n- **Priority**: Compatibility with the minimal LTS version supported of Django.\n- **Priority**: Compatibility with the minimal version of Python.\n- Secondary: Update to the las version available of the icons.\n\nIn short 🎯: the priority is to assure that the package works ever in the stable environments and take advantage of each maintenance cycle you carry out to incorporate the new icons that may be released.\n\n\n\n## ⚖️ Apache 2.0\n\nThis package is distributed under the [Apache License 2.0](LICENCE), allowing free use and open distribution of the icons.\n\nAbout the icons:\n\n- **Licence** Distributed under the [Apache License 2.0](https://apache.org) (_Pictogrammers Free License_). <!-- the url is being kept in case the technical team decides to change it on the future -->\n- **Maintenance** This package solely bundles the existing icons; all design, distribution, addition, or modification decisions regarding the original library rest exclusively with the [Pictogrammers team](https://pictogrammers.com).',
|
|
21
21
|
'author': 'IndustrialRabbit',
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -30,8 +30,8 @@ MDI_ICON_SETS_NAMES = Literal['default', 'light']
|
|
|
30
30
|
"""types of options that can one select"""
|
|
31
31
|
|
|
32
32
|
MDI_ICON_SETS: Final[dict[MDI_ICON_SETS_NAMES, Path]] = {
|
|
33
|
-
"default": BASE_PATH/Path("icons/default.
|
|
34
|
-
"light": BASE_PATH/Path("icons/light.
|
|
33
|
+
"default": BASE_PATH/Path("icons/default.whl"),
|
|
34
|
+
"light": BASE_PATH/Path("icons/light.whl"),
|
|
35
35
|
}
|
|
36
36
|
"""The icon sets available for the moment"""
|
|
37
37
|
|
|
@@ -49,7 +49,7 @@ def is_default_light() -> bool:
|
|
|
49
49
|
def _get_archive(icon_set: MDI_ICON_SETS_NAMES = 'default') -> zipfile.ZipFile | None:
|
|
50
50
|
"""return the icon set file descriptor
|
|
51
51
|
|
|
52
|
-
Its open and return the `ZipFile` instance of the .
|
|
52
|
+
Its open and return the `ZipFile` instance of the .whl file where the icons
|
|
53
53
|
are compressed.
|
|
54
54
|
|
|
55
55
|
Parameters
|
|
File without changes
|
{django_material_design_icons-0.0.1.dev1 → django_material_design_icons-0.0.1.dev2}/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|