%global _empty_manifest_terminate_build 0 Name: python-gumo-core Version: 0.1.4 Release: 1 Summary: Gumo Core Library License: MIT License URL: https://github.com/gumo-py/gumo-core Source0: https://mirrors.nju.edu.cn/pypi/web/packages/95/49/1e97347002d8676b2e045ff2093798d36e0fa3aa408ca96f7e1f963a4bd9/gumo-core-0.1.4.tar.gz BuildArch: noarch Requires: python3-pyyaml Requires: python3-injector Requires: python3-google-cloud-storage Requires: python3-google-api-python-client %description # gumo-core [![CircleCI](https://circleci.com/gh/gumo-py/gumo-core.svg?style=svg)](https://circleci.com/gh/gumo-py/gumo-core) ## Configuration ```python from gumo.core import configure as core_configure core_configure( google_cloud_project='', google_cloud_location='', ) ``` If you need to load environment variables of app.yaml: ```python import os import flask from gumo.core import MockAppEngineEnvironment # from gumo.core import configure as core_configure # The call to MockAppEngineEnvironment must precede any other initialization code. if __name__ == '__main__': app_yaml_path = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'app.yaml' ) MockAppEngineEnvironment.load_app_yaml(app_yaml_path=app_yaml_path) # core_configure() # Application Configurations ... app = flask.Flask(__name__) if __name__ == '__main__': app.run(host='0.0.0.0', port=8080, debug=True) ``` ## Setup Development Environment ```sh $ git clone https://github.com/gumo-py/gumo-core.git $ cd gumo-core $ make setup ``` ## Build and Test ```sh $ make build $ make test ``` ## EntityKey ```python from gumo.core import EntityKey from gumo.core import EntityKeyFactory key = EntityKeyFactory().build(kind='Book', name='978-1-4028-9462-6') assert isinstance(key, EntityKey) assert key.key_literal() == "Key('Book', '978-1-4028-9462-6')" assert key.key_path() == 'Book:978-1-4028-9462-6' assert key.key_url() == 'Book/978-1-4028-9462-6' ``` %package -n python3-gumo-core Summary: Gumo Core Library Provides: python-gumo-core BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-gumo-core # gumo-core [![CircleCI](https://circleci.com/gh/gumo-py/gumo-core.svg?style=svg)](https://circleci.com/gh/gumo-py/gumo-core) ## Configuration ```python from gumo.core import configure as core_configure core_configure( google_cloud_project='', google_cloud_location='', ) ``` If you need to load environment variables of app.yaml: ```python import os import flask from gumo.core import MockAppEngineEnvironment # from gumo.core import configure as core_configure # The call to MockAppEngineEnvironment must precede any other initialization code. if __name__ == '__main__': app_yaml_path = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'app.yaml' ) MockAppEngineEnvironment.load_app_yaml(app_yaml_path=app_yaml_path) # core_configure() # Application Configurations ... app = flask.Flask(__name__) if __name__ == '__main__': app.run(host='0.0.0.0', port=8080, debug=True) ``` ## Setup Development Environment ```sh $ git clone https://github.com/gumo-py/gumo-core.git $ cd gumo-core $ make setup ``` ## Build and Test ```sh $ make build $ make test ``` ## EntityKey ```python from gumo.core import EntityKey from gumo.core import EntityKeyFactory key = EntityKeyFactory().build(kind='Book', name='978-1-4028-9462-6') assert isinstance(key, EntityKey) assert key.key_literal() == "Key('Book', '978-1-4028-9462-6')" assert key.key_path() == 'Book:978-1-4028-9462-6' assert key.key_url() == 'Book/978-1-4028-9462-6' ``` %package help Summary: Development documents and examples for gumo-core Provides: python3-gumo-core-doc %description help # gumo-core [![CircleCI](https://circleci.com/gh/gumo-py/gumo-core.svg?style=svg)](https://circleci.com/gh/gumo-py/gumo-core) ## Configuration ```python from gumo.core import configure as core_configure core_configure( google_cloud_project='', google_cloud_location='', ) ``` If you need to load environment variables of app.yaml: ```python import os import flask from gumo.core import MockAppEngineEnvironment # from gumo.core import configure as core_configure # The call to MockAppEngineEnvironment must precede any other initialization code. if __name__ == '__main__': app_yaml_path = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'app.yaml' ) MockAppEngineEnvironment.load_app_yaml(app_yaml_path=app_yaml_path) # core_configure() # Application Configurations ... app = flask.Flask(__name__) if __name__ == '__main__': app.run(host='0.0.0.0', port=8080, debug=True) ``` ## Setup Development Environment ```sh $ git clone https://github.com/gumo-py/gumo-core.git $ cd gumo-core $ make setup ``` ## Build and Test ```sh $ make build $ make test ``` ## EntityKey ```python from gumo.core import EntityKey from gumo.core import EntityKeyFactory key = EntityKeyFactory().build(kind='Book', name='978-1-4028-9462-6') assert isinstance(key, EntityKey) assert key.key_literal() == "Key('Book', '978-1-4028-9462-6')" assert key.key_path() == 'Book:978-1-4028-9462-6' assert key.key_url() == 'Book/978-1-4028-9462-6' ``` %prep %autosetup -n gumo-core-0.1.4 %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-gumo-core -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Wed May 31 2023 Python_Bot - 0.1.4-1 - Package Spec generated