%global _empty_manifest_terminate_build 0 Name: python-datastore-viewer Version: 0.3.1 Release: 1 Summary: Datastore Viewer for emulator License: MIT License URL: https://github.com/gumo-py/datastore-viewer Source0: https://mirrors.aliyun.com/pypi/web/packages/ca/08/9d0929bd7485f91a4c764d58538f00038d7a68bf6441b0af649e5c7bd741/datastore-viewer-0.3.1.tar.gz BuildArch: noarch Requires: python3-google-cloud-datastore Requires: python3-Flask Requires: python3-flasgger %description # datastore-viewer datastore-viewer is a simple viewer of Google Cloud Datastore Emulator. ## Quickstart using docker-compose A example of docker-compose.yml: ```yaml version: "3" services: datastore_emulator: image: quay.io/gumo/datastore-emulator environment: DATASTORE_PROJECT_ID: test-project DATASTORE_LISTEN_ADDRESS: 0.0.0.0:8081 ports: - "8081:8081" volumes: - datastore-emulator-storage:/opt/data # command: start-datastore --no-store-on-disk --consistency=1.0 datastore_viewer: image: quay.io/gumo/datastore-viewer environment: DATASTORE_VIEWER_HOST: 0.0.0.0 DATASTORE_VIEWER_PORT: 18081 GOOGLE_CLOUD_PROJECT: test-project DATASTORE_EMULATOR_HOST: datastore_emulator:8081 depends_on: - datastore_emulator ports: - "18081:18081" volumes: datastore-emulator-storage: driver: local ``` Execute docker containers: ```bash docker-compose up ``` Please access to: [http://127.0.0.1:18081](http://127.0.0.1:18081) ## for Developers ### Setup Create new venv: ```bash $ python -m venv venv $ source venv/bin/activate ``` Upgrade pip and install building tools: ```bash $ pip install --upgrade pip $ pip install twine wheel pytest pip-tools ``` Install dependency packages: ```bash $ pip install -r requirements.txt ``` ### Run ```bash $ export DATASTORE_EMULATOR_HOST=127.0.0.1:8081 $ make run ``` ### Package Build ```bash $ make build ``` %package -n python3-datastore-viewer Summary: Datastore Viewer for emulator Provides: python-datastore-viewer BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-datastore-viewer # datastore-viewer datastore-viewer is a simple viewer of Google Cloud Datastore Emulator. ## Quickstart using docker-compose A example of docker-compose.yml: ```yaml version: "3" services: datastore_emulator: image: quay.io/gumo/datastore-emulator environment: DATASTORE_PROJECT_ID: test-project DATASTORE_LISTEN_ADDRESS: 0.0.0.0:8081 ports: - "8081:8081" volumes: - datastore-emulator-storage:/opt/data # command: start-datastore --no-store-on-disk --consistency=1.0 datastore_viewer: image: quay.io/gumo/datastore-viewer environment: DATASTORE_VIEWER_HOST: 0.0.0.0 DATASTORE_VIEWER_PORT: 18081 GOOGLE_CLOUD_PROJECT: test-project DATASTORE_EMULATOR_HOST: datastore_emulator:8081 depends_on: - datastore_emulator ports: - "18081:18081" volumes: datastore-emulator-storage: driver: local ``` Execute docker containers: ```bash docker-compose up ``` Please access to: [http://127.0.0.1:18081](http://127.0.0.1:18081) ## for Developers ### Setup Create new venv: ```bash $ python -m venv venv $ source venv/bin/activate ``` Upgrade pip and install building tools: ```bash $ pip install --upgrade pip $ pip install twine wheel pytest pip-tools ``` Install dependency packages: ```bash $ pip install -r requirements.txt ``` ### Run ```bash $ export DATASTORE_EMULATOR_HOST=127.0.0.1:8081 $ make run ``` ### Package Build ```bash $ make build ``` %package help Summary: Development documents and examples for datastore-viewer Provides: python3-datastore-viewer-doc %description help # datastore-viewer datastore-viewer is a simple viewer of Google Cloud Datastore Emulator. ## Quickstart using docker-compose A example of docker-compose.yml: ```yaml version: "3" services: datastore_emulator: image: quay.io/gumo/datastore-emulator environment: DATASTORE_PROJECT_ID: test-project DATASTORE_LISTEN_ADDRESS: 0.0.0.0:8081 ports: - "8081:8081" volumes: - datastore-emulator-storage:/opt/data # command: start-datastore --no-store-on-disk --consistency=1.0 datastore_viewer: image: quay.io/gumo/datastore-viewer environment: DATASTORE_VIEWER_HOST: 0.0.0.0 DATASTORE_VIEWER_PORT: 18081 GOOGLE_CLOUD_PROJECT: test-project DATASTORE_EMULATOR_HOST: datastore_emulator:8081 depends_on: - datastore_emulator ports: - "18081:18081" volumes: datastore-emulator-storage: driver: local ``` Execute docker containers: ```bash docker-compose up ``` Please access to: [http://127.0.0.1:18081](http://127.0.0.1:18081) ## for Developers ### Setup Create new venv: ```bash $ python -m venv venv $ source venv/bin/activate ``` Upgrade pip and install building tools: ```bash $ pip install --upgrade pip $ pip install twine wheel pytest pip-tools ``` Install dependency packages: ```bash $ pip install -r requirements.txt ``` ### Run ```bash $ export DATASTORE_EMULATOR_HOST=127.0.0.1:8081 $ make run ``` ### Package Build ```bash $ make build ``` %prep %autosetup -n datastore-viewer-0.3.1 %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-datastore-viewer -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Jun 20 2023 Python_Bot - 0.3.1-1 - Package Spec generated