summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 06:08:20 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 06:08:20 +0000
commit1643599d80346e34dada8f12725bf9c5b642d426 (patch)
treed485f08eb04f4346d93fec254b421ed99e2f1ab0
parentb0594ba72a88388cfb946110b98154f79e67be0d (diff)
automatic import of python-wedge-lib
-rw-r--r--.gitignore1
-rw-r--r--python-wedge-lib.spec482
-rw-r--r--sources1
3 files changed, 484 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..a740db1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/wedge-lib-3.0.8.tar.gz
diff --git a/python-wedge-lib.spec b/python-wedge-lib.spec
new file mode 100644
index 0000000..53aafe4
--- /dev/null
+++ b/python-wedge-lib.spec
@@ -0,0 +1,482 @@
+%global _empty_manifest_terminate_build 0
+Name: python-wedge-lib
+Version: 3.0.8
+Release: 1
+Summary: Wedge library for django application
+License: MIT
+URL: https://github.com/Wedge-Digital/w
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/a9/12/9e979549bbab7d34fa5b190cfc10f4b4719fc422d856989fc4eea1dc6318/wedge-lib-3.0.8.tar.gz
+BuildArch: noarch
+
+Requires: python3-arrow
+Requires: python3-Django
+Requires: python3-djangorestframework
+Requires: python3-djangorestframework-api-key
+Requires: python3-factory-boy
+Requires: python3-openpyxl
+Requires: python3-keycloak
+Requires: python3-PyYAML
+Requires: python3-requests
+Requires: python3-serpy
+Requires: python3-validators
+Requires: python3-var-dump
+Requires: python3-WeasyPrint
+Requires: python3-pyzstd
+Requires: python3-cryptography
+Requires: python3-pandas
+Requires: python3-mergedeep
+
+%description
+# Wedge Library
+
+## Démarrage rapide
+
+```bash
+$ pip install wedge-lib
+```
+
+### Mode maintenance
+
+#### Middleware
+
+```python
+MIDDLEWARE=[
+ "w.drf.middlewares.maintenance_mode_middleware.MaintenanceModeMiddleware",
+],
+```
+
+
+#### Command
+
+Ajouter la commande maintenance_mode :
+
+```python
+from w.django.commands.abstract_maintenance_mode_command import (
+ AbstractMaintenanceModeCommand,
+)
+
+
+class Command(AbstractMaintenanceModeCommand):
+ pass
+```
+
+Utilisation :
+
+```bash
+$ python manage.py maintenance_mode <on/off>
+```
+
+### Configuration pour certains services
+
+#### MailService
+TBD
+#### GoogleMapService
+TBD
+#### YousignService
+TBD
+
+## Development
+
+### Installation
+
+```bash
+$ pipenv sync --dev
+```
+
+### Update dependencies
+
+```bash
+$ pipenv update --dev
+```
+
+### Run test
+
+```bash
+$ pytest
+```
+
+### En cas d'ajout d'une librairie
+Afin qu'elle soit également installée sur cs_back, il faut ajouter une ligne dans setup.cfg, sous la partie "install_requires ="
+
+Des variables d'environnement doivent être configurées sur Pycharm:
+- Cliquez sur Edit configurations en haut à droite de votre éditeur
+- Edit configurations templates...
+- Python tests - pytest
+- Cliquez sur environnement variables et ajouter les api key correspondant à :
+ - GOOGLE_MAP_SECRET
+ - GOOGLE_MAP_API_KEY
+- Les valeurs de ces variables peuvent être trouvées sur les secrets du repo ou à Eloïse
+
+### Before commit
+
+Pour éviter de faire échouer le CI, lancer la commande:
+
+```bash
+$ ./before_commit.zsh
+```
+
+### Publier manuellement sur PyPI
+
+Après avoir committer et pousser:
+
+1. tagguer une version dans GitHub.
+2. mettre à jour la version dans le fichier `setup.cfg` avec le tag créé.
+3. créer le package
+ ```bash
+ $ rm -rf build dist wedge_lib.egg-info
+ $ WEDGELIB_VERSION=<version> python setup.py sdist bdist_wheel
+ ```
+4. mettre à jour sur TestPypi
+ ```bash
+ $ twine upload --repository testpypi dist/*
+ ```
+5. Si tout est ok, mettre à jour sur Pypi
+ ```bash
+ $ twine upload dist/*
+ ```
+
+### Utiliser W en mode dev depuis un autre projet (ex: csback)
+
+Créer un lien symbolique vers le w qui va être modifié :
+```bash
+rm -rf <External Libraries>/site-packages/w
+```
+```bash
+ln -s <Absolute path du projet w local>/w <External Libraries>/site-packages/.
+```
+
+Supprimer le lien symbolique et utiliser la version officielle de w :
+```bash
+unlink <External Libraries>/site-packages/w
+```
+```bash
+pipenv uninstall wedge-lib && pipenv install wedge-lib
+```
+
+
+
+
+
+
+
+
+%package -n python3-wedge-lib
+Summary: Wedge library for django application
+Provides: python-wedge-lib
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-wedge-lib
+# Wedge Library
+
+## Démarrage rapide
+
+```bash
+$ pip install wedge-lib
+```
+
+### Mode maintenance
+
+#### Middleware
+
+```python
+MIDDLEWARE=[
+ "w.drf.middlewares.maintenance_mode_middleware.MaintenanceModeMiddleware",
+],
+```
+
+
+#### Command
+
+Ajouter la commande maintenance_mode :
+
+```python
+from w.django.commands.abstract_maintenance_mode_command import (
+ AbstractMaintenanceModeCommand,
+)
+
+
+class Command(AbstractMaintenanceModeCommand):
+ pass
+```
+
+Utilisation :
+
+```bash
+$ python manage.py maintenance_mode <on/off>
+```
+
+### Configuration pour certains services
+
+#### MailService
+TBD
+#### GoogleMapService
+TBD
+#### YousignService
+TBD
+
+## Development
+
+### Installation
+
+```bash
+$ pipenv sync --dev
+```
+
+### Update dependencies
+
+```bash
+$ pipenv update --dev
+```
+
+### Run test
+
+```bash
+$ pytest
+```
+
+### En cas d'ajout d'une librairie
+Afin qu'elle soit également installée sur cs_back, il faut ajouter une ligne dans setup.cfg, sous la partie "install_requires ="
+
+Des variables d'environnement doivent être configurées sur Pycharm:
+- Cliquez sur Edit configurations en haut à droite de votre éditeur
+- Edit configurations templates...
+- Python tests - pytest
+- Cliquez sur environnement variables et ajouter les api key correspondant à :
+ - GOOGLE_MAP_SECRET
+ - GOOGLE_MAP_API_KEY
+- Les valeurs de ces variables peuvent être trouvées sur les secrets du repo ou à Eloïse
+
+### Before commit
+
+Pour éviter de faire échouer le CI, lancer la commande:
+
+```bash
+$ ./before_commit.zsh
+```
+
+### Publier manuellement sur PyPI
+
+Après avoir committer et pousser:
+
+1. tagguer une version dans GitHub.
+2. mettre à jour la version dans le fichier `setup.cfg` avec le tag créé.
+3. créer le package
+ ```bash
+ $ rm -rf build dist wedge_lib.egg-info
+ $ WEDGELIB_VERSION=<version> python setup.py sdist bdist_wheel
+ ```
+4. mettre à jour sur TestPypi
+ ```bash
+ $ twine upload --repository testpypi dist/*
+ ```
+5. Si tout est ok, mettre à jour sur Pypi
+ ```bash
+ $ twine upload dist/*
+ ```
+
+### Utiliser W en mode dev depuis un autre projet (ex: csback)
+
+Créer un lien symbolique vers le w qui va être modifié :
+```bash
+rm -rf <External Libraries>/site-packages/w
+```
+```bash
+ln -s <Absolute path du projet w local>/w <External Libraries>/site-packages/.
+```
+
+Supprimer le lien symbolique et utiliser la version officielle de w :
+```bash
+unlink <External Libraries>/site-packages/w
+```
+```bash
+pipenv uninstall wedge-lib && pipenv install wedge-lib
+```
+
+
+
+
+
+
+
+
+%package help
+Summary: Development documents and examples for wedge-lib
+Provides: python3-wedge-lib-doc
+%description help
+# Wedge Library
+
+## Démarrage rapide
+
+```bash
+$ pip install wedge-lib
+```
+
+### Mode maintenance
+
+#### Middleware
+
+```python
+MIDDLEWARE=[
+ "w.drf.middlewares.maintenance_mode_middleware.MaintenanceModeMiddleware",
+],
+```
+
+
+#### Command
+
+Ajouter la commande maintenance_mode :
+
+```python
+from w.django.commands.abstract_maintenance_mode_command import (
+ AbstractMaintenanceModeCommand,
+)
+
+
+class Command(AbstractMaintenanceModeCommand):
+ pass
+```
+
+Utilisation :
+
+```bash
+$ python manage.py maintenance_mode <on/off>
+```
+
+### Configuration pour certains services
+
+#### MailService
+TBD
+#### GoogleMapService
+TBD
+#### YousignService
+TBD
+
+## Development
+
+### Installation
+
+```bash
+$ pipenv sync --dev
+```
+
+### Update dependencies
+
+```bash
+$ pipenv update --dev
+```
+
+### Run test
+
+```bash
+$ pytest
+```
+
+### En cas d'ajout d'une librairie
+Afin qu'elle soit également installée sur cs_back, il faut ajouter une ligne dans setup.cfg, sous la partie "install_requires ="
+
+Des variables d'environnement doivent être configurées sur Pycharm:
+- Cliquez sur Edit configurations en haut à droite de votre éditeur
+- Edit configurations templates...
+- Python tests - pytest
+- Cliquez sur environnement variables et ajouter les api key correspondant à :
+ - GOOGLE_MAP_SECRET
+ - GOOGLE_MAP_API_KEY
+- Les valeurs de ces variables peuvent être trouvées sur les secrets du repo ou à Eloïse
+
+### Before commit
+
+Pour éviter de faire échouer le CI, lancer la commande:
+
+```bash
+$ ./before_commit.zsh
+```
+
+### Publier manuellement sur PyPI
+
+Après avoir committer et pousser:
+
+1. tagguer une version dans GitHub.
+2. mettre à jour la version dans le fichier `setup.cfg` avec le tag créé.
+3. créer le package
+ ```bash
+ $ rm -rf build dist wedge_lib.egg-info
+ $ WEDGELIB_VERSION=<version> python setup.py sdist bdist_wheel
+ ```
+4. mettre à jour sur TestPypi
+ ```bash
+ $ twine upload --repository testpypi dist/*
+ ```
+5. Si tout est ok, mettre à jour sur Pypi
+ ```bash
+ $ twine upload dist/*
+ ```
+
+### Utiliser W en mode dev depuis un autre projet (ex: csback)
+
+Créer un lien symbolique vers le w qui va être modifié :
+```bash
+rm -rf <External Libraries>/site-packages/w
+```
+```bash
+ln -s <Absolute path du projet w local>/w <External Libraries>/site-packages/.
+```
+
+Supprimer le lien symbolique et utiliser la version officielle de w :
+```bash
+unlink <External Libraries>/site-packages/w
+```
+```bash
+pipenv uninstall wedge-lib && pipenv install wedge-lib
+```
+
+
+
+
+
+
+
+
+%prep
+%autosetup -n wedge-lib-3.0.8
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-wedge-lib -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 3.0.8-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..5798c10
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+c1eab52e9efa6487984e0eb4b31490d8 wedge-lib-3.0.8.tar.gz