From 435cf0041524683fc1ab5526c80021345182a6d7 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 11 Apr 2023 12:38:46 +0000 Subject: automatic import of python-flask-appconfig --- .gitignore | 1 + python-flask-appconfig.spec | 120 ++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 122 insertions(+) create mode 100644 python-flask-appconfig.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..3f0297f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/flask-appconfig-0.11.1.tar.gz diff --git a/python-flask-appconfig.spec b/python-flask-appconfig.spec new file mode 100644 index 0000000..a766e70 --- /dev/null +++ b/python-flask-appconfig.spec @@ -0,0 +1,120 @@ +%global _empty_manifest_terminate_build 0 +Name: python-flask-appconfig +Version: 0.11.1 +Release: 1 +Summary: Configures Flask applications in a canonical way. Also auto-configures Heroku. Aims to standardize configuration. +License: MIT +URL: http://github.com/mbr/flask-appconfig +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/a6/52/8e331479219648b850abfa570d09ff962580800b39f017cbd529e267acae/flask-appconfig-0.11.1.tar.gz +BuildArch: noarch + + +%description +Allows you to configure an application using pre-set methods. + from flask_appconfig import AppConfig + def create_app(configfile=None): + app = Flask('myapp') + AppConfig(app, configfile) + return app +The application returned by ``create_app`` will, in order: +1. Load default settings from a module called ``myapp.default_config``, if it + exists. (method described in + http://flask.pocoo.org/docs/config/#configuring-from-files ) +2. Load settings from a configuration file whose name is given in the + environment variable ``MYAPP_CONFIG`` (see link from 1.). +3. Load json or string values directly from environment variables that start + with a prefix of ``MYAPP_``, i.e. setting ``MYAPP_SQLALCHEMY_ECHO=true`` + will cause the setting of ``SQLALCHEMY_ECHO`` to be ``True``. +Any of these behaviors can be altered or disabled by passing the appropriate +options to the constructor or ``init_app()``. + +%package -n python3-flask-appconfig +Summary: Configures Flask applications in a canonical way. Also auto-configures Heroku. Aims to standardize configuration. +Provides: python-flask-appconfig +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-flask-appconfig +Allows you to configure an application using pre-set methods. + from flask_appconfig import AppConfig + def create_app(configfile=None): + app = Flask('myapp') + AppConfig(app, configfile) + return app +The application returned by ``create_app`` will, in order: +1. Load default settings from a module called ``myapp.default_config``, if it + exists. (method described in + http://flask.pocoo.org/docs/config/#configuring-from-files ) +2. Load settings from a configuration file whose name is given in the + environment variable ``MYAPP_CONFIG`` (see link from 1.). +3. Load json or string values directly from environment variables that start + with a prefix of ``MYAPP_``, i.e. setting ``MYAPP_SQLALCHEMY_ECHO=true`` + will cause the setting of ``SQLALCHEMY_ECHO`` to be ``True``. +Any of these behaviors can be altered or disabled by passing the appropriate +options to the constructor or ``init_app()``. + +%package help +Summary: Development documents and examples for flask-appconfig +Provides: python3-flask-appconfig-doc +%description help +Allows you to configure an application using pre-set methods. + from flask_appconfig import AppConfig + def create_app(configfile=None): + app = Flask('myapp') + AppConfig(app, configfile) + return app +The application returned by ``create_app`` will, in order: +1. Load default settings from a module called ``myapp.default_config``, if it + exists. (method described in + http://flask.pocoo.org/docs/config/#configuring-from-files ) +2. Load settings from a configuration file whose name is given in the + environment variable ``MYAPP_CONFIG`` (see link from 1.). +3. Load json or string values directly from environment variables that start + with a prefix of ``MYAPP_``, i.e. setting ``MYAPP_SQLALCHEMY_ECHO=true`` + will cause the setting of ``SQLALCHEMY_ECHO`` to be ``True``. +Any of these behaviors can be altered or disabled by passing the appropriate +options to the constructor or ``init_app()``. + +%prep +%autosetup -n flask-appconfig-0.11.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-flask-appconfig -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot - 0.11.1-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..c22d917 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +b1fa50ef82aac9ef93d1675c636e39fc flask-appconfig-0.11.1.tar.gz -- cgit v1.2.3