diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-05 05:43:29 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 05:43:29 +0000 |
| commit | 031129b93cc22c140da8b9e32dd44190c6c26c8f (patch) | |
| tree | 0a8f9eb6a479f123d5be631b6d1b07519cfed8d2 | |
| parent | e1cf32245a494bda8d420d7f0f2ef831ca08ff25 (diff) | |
automatic import of python-rescape-grapheneopeneuler20.03
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-rescape-graphene.spec | 343 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 345 insertions, 0 deletions
@@ -0,0 +1 @@ +/rescape-graphene-0.4.19.tar.gz diff --git a/python-rescape-graphene.spec b/python-rescape-graphene.spec new file mode 100644 index 0000000..dc9f839 --- /dev/null +++ b/python-rescape-graphene.spec @@ -0,0 +1,343 @@ +%global _empty_manifest_terminate_build 0 +Name: python-rescape-graphene +Version: 0.4.19 +Release: 1 +Summary: Graphene helpers for rescape projects +License: MIT License +URL: https://github.com/calocan/rescape_graphene +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c7/8f/8e2299f70faee889ee5c61a9a42a7215850e3809b6ceb303622e3f3e3e56/rescape-graphene-0.4.19.tar.gz +BuildArch: noarch + +Requires: python3-pyramda +Requires: python3-graphene +Requires: python3-graphene-django +Requires: python3-inflection +Requires: python3-deepmerge +Requires: python3-djangorestframework +Requires: python3-djangorestframework-jwt +Requires: python3-psycopg2-binary +Requires: python3-django-graphql-jwt +Requires: python3-utils +Requires: python3-simplejson +Requires: python3-jsonfield +Requires: python3-rescape-python-helpers + +%description +# rescape_graphene +Graphene helpers for rescape projects + +## Installation + +Create a virtual environment using +```bash +mkdir ~/.virtualenvs +python3 -m venv ~/.virtualenvs/rescape-graphene +Activate it +source ~/.virtualenvs/rescape-graphene/bin/activate +``` + +#### Install requirements +If you don't have pur installed: +pip install pur + +This updates requirements.txt to their latest version + +Install requirements with latest versions +```bash +pur -r requirements.txt && $VIRTUAL_ENV/bin/pip3 install --no-cache-dir --upgrade -r requirements.txt +``` + +Add the following to the bottom $VIRTUAL_ENV/bin/activate to setup the PYTHONPATH. +Replace the path with your code directory + +```bash +export RESCAPE_GRAPHENE_BASE_DIR=/Users/andy/code/rescape-graphene +export RESCAPE_GRAPHENE_PROJECT_DIR=$RESCAPE_GRAPHENE_BASE_DIR/urbinsight +export PYTHONPATH=.:$RESCAPE_GRAPHENE_BASE_DIR:$RESCAPE_GRAPHENE_PROJECT_DIR +``` + +## Build + +Update the version in setup.py +Run to generate build: +Update the version with bumpversion, which can't seem to look it up itself but udpates setup.py + +```bash +git commit . -m "Version update" && git push +bumpversion --current-version {look in setup.py} patch setup.py +python3 setup.py clean sdist bdist_wheel +``` + +To distribute to testpypi site: +Upload package: + +```bash +twine upload dist/* +``` + +All at once +``` bash +git commit . -m "Version update" && git push && bumpversion --current-version {look in setup.py} patch setup.py && python3 setup.py clean sdist bdist_wheel && twine upload dist/* +# without commit +bumpversion --current-version {look in setup.py} patch setup.py && python3 setup.py clean sdist bdist_wheel && twine upload dist/* +``` + +For setup of testpypi see ~/.pypirc or create one according to the testpypi docs: +e.g.: +[distutils] +index-servers= + pypi + testpypi + +[testpypi] +repository: https://test.pypi.org/legacy/ +username: your username for pypi.org + +## Running tests +Create a postgres database rescape_graphene +# Login to psql: +CREATE DATABASE rescape_graphene; +CREATE USER test_user WITH PASSWORD 'test'; +GRANT ALL PRIVILEGES ON DATABASE rescape_graphene to test_user; +# Give Superuser permission to create test databases +ALTER ROLE test_user SUPERUSER; + +# Run the migrations +# Create a Django user test with pw testpass + ./manage.py createsuperuser + # or + echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('test', 'test@nowhere.man', 'testpass')" | ./manage.py shell + + + + +%package -n python3-rescape-graphene +Summary: Graphene helpers for rescape projects +Provides: python-rescape-graphene +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-rescape-graphene +# rescape_graphene +Graphene helpers for rescape projects + +## Installation + +Create a virtual environment using +```bash +mkdir ~/.virtualenvs +python3 -m venv ~/.virtualenvs/rescape-graphene +Activate it +source ~/.virtualenvs/rescape-graphene/bin/activate +``` + +#### Install requirements +If you don't have pur installed: +pip install pur + +This updates requirements.txt to their latest version + +Install requirements with latest versions +```bash +pur -r requirements.txt && $VIRTUAL_ENV/bin/pip3 install --no-cache-dir --upgrade -r requirements.txt +``` + +Add the following to the bottom $VIRTUAL_ENV/bin/activate to setup the PYTHONPATH. +Replace the path with your code directory + +```bash +export RESCAPE_GRAPHENE_BASE_DIR=/Users/andy/code/rescape-graphene +export RESCAPE_GRAPHENE_PROJECT_DIR=$RESCAPE_GRAPHENE_BASE_DIR/urbinsight +export PYTHONPATH=.:$RESCAPE_GRAPHENE_BASE_DIR:$RESCAPE_GRAPHENE_PROJECT_DIR +``` + +## Build + +Update the version in setup.py +Run to generate build: +Update the version with bumpversion, which can't seem to look it up itself but udpates setup.py + +```bash +git commit . -m "Version update" && git push +bumpversion --current-version {look in setup.py} patch setup.py +python3 setup.py clean sdist bdist_wheel +``` + +To distribute to testpypi site: +Upload package: + +```bash +twine upload dist/* +``` + +All at once +``` bash +git commit . -m "Version update" && git push && bumpversion --current-version {look in setup.py} patch setup.py && python3 setup.py clean sdist bdist_wheel && twine upload dist/* +# without commit +bumpversion --current-version {look in setup.py} patch setup.py && python3 setup.py clean sdist bdist_wheel && twine upload dist/* +``` + +For setup of testpypi see ~/.pypirc or create one according to the testpypi docs: +e.g.: +[distutils] +index-servers= + pypi + testpypi + +[testpypi] +repository: https://test.pypi.org/legacy/ +username: your username for pypi.org + +## Running tests +Create a postgres database rescape_graphene +# Login to psql: +CREATE DATABASE rescape_graphene; +CREATE USER test_user WITH PASSWORD 'test'; +GRANT ALL PRIVILEGES ON DATABASE rescape_graphene to test_user; +# Give Superuser permission to create test databases +ALTER ROLE test_user SUPERUSER; + +# Run the migrations +# Create a Django user test with pw testpass + ./manage.py createsuperuser + # or + echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('test', 'test@nowhere.man', 'testpass')" | ./manage.py shell + + + + +%package help +Summary: Development documents and examples for rescape-graphene +Provides: python3-rescape-graphene-doc +%description help +# rescape_graphene +Graphene helpers for rescape projects + +## Installation + +Create a virtual environment using +```bash +mkdir ~/.virtualenvs +python3 -m venv ~/.virtualenvs/rescape-graphene +Activate it +source ~/.virtualenvs/rescape-graphene/bin/activate +``` + +#### Install requirements +If you don't have pur installed: +pip install pur + +This updates requirements.txt to their latest version + +Install requirements with latest versions +```bash +pur -r requirements.txt && $VIRTUAL_ENV/bin/pip3 install --no-cache-dir --upgrade -r requirements.txt +``` + +Add the following to the bottom $VIRTUAL_ENV/bin/activate to setup the PYTHONPATH. +Replace the path with your code directory + +```bash +export RESCAPE_GRAPHENE_BASE_DIR=/Users/andy/code/rescape-graphene +export RESCAPE_GRAPHENE_PROJECT_DIR=$RESCAPE_GRAPHENE_BASE_DIR/urbinsight +export PYTHONPATH=.:$RESCAPE_GRAPHENE_BASE_DIR:$RESCAPE_GRAPHENE_PROJECT_DIR +``` + +## Build + +Update the version in setup.py +Run to generate build: +Update the version with bumpversion, which can't seem to look it up itself but udpates setup.py + +```bash +git commit . -m "Version update" && git push +bumpversion --current-version {look in setup.py} patch setup.py +python3 setup.py clean sdist bdist_wheel +``` + +To distribute to testpypi site: +Upload package: + +```bash +twine upload dist/* +``` + +All at once +``` bash +git commit . -m "Version update" && git push && bumpversion --current-version {look in setup.py} patch setup.py && python3 setup.py clean sdist bdist_wheel && twine upload dist/* +# without commit +bumpversion --current-version {look in setup.py} patch setup.py && python3 setup.py clean sdist bdist_wheel && twine upload dist/* +``` + +For setup of testpypi see ~/.pypirc or create one according to the testpypi docs: +e.g.: +[distutils] +index-servers= + pypi + testpypi + +[testpypi] +repository: https://test.pypi.org/legacy/ +username: your username for pypi.org + +## Running tests +Create a postgres database rescape_graphene +# Login to psql: +CREATE DATABASE rescape_graphene; +CREATE USER test_user WITH PASSWORD 'test'; +GRANT ALL PRIVILEGES ON DATABASE rescape_graphene to test_user; +# Give Superuser permission to create test databases +ALTER ROLE test_user SUPERUSER; + +# Run the migrations +# Create a Django user test with pw testpass + ./manage.py createsuperuser + # or + echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('test', 'test@nowhere.man', 'testpass')" | ./manage.py shell + + + + +%prep +%autosetup -n rescape-graphene-0.4.19 + +%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-rescape-graphene -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.19-1 +- Package Spec generated @@ -0,0 +1 @@ +0d3bcb229850921e443669d770c24207 rescape-graphene-0.4.19.tar.gz |
