Пакет python-module-babel: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | %define oname babel %def_with python3 #def_disable check Name: python-module-%oname Version: 3.0 Release: alt1.dev.git20150805 Summary: a collection of tools for internationalizing Python applications License: BSD Group: Development/Python Url: http://babel.edgewall.org # https://github.com/mitsuhiko/babel.git Source: %name-%version.tar Source1: CLDR.tar BuildArch: noarch BuildPreReq: python-module-setuptools-tests python-module-sphinx-devel BuildPreReq: python-module-pytest-cov %{?!_without_check:%{?!_disable_check:BuildRequires: %py_dependencies setuptools.command.test pytz}} %setup_python_module babel %if_with python3 BuildRequires(pre): rpm-build-python3 BuildRequires: python3-devel python3-module-setuptools-tests BuildPreReq: python3-module-pytest-cov BuildPreReq: python3-module-pytz python-tools-2to3 %endif %py_requires pytz %description Babel is an integrated collection of utilities that assist in internationalizing and localizing Python applications, with an emphasis on web-based applications. The functionality Babel provides for internationalization (I18n) and localization (L10N) can be separated into two different aspects: * tools to build and work with gettext message catalogs, and * a Python interface to the CLDR (Common Locale Data Repository), providing access to various locale display names, localized number and date formatting, etc. %if_with python3 %package -n python3-module-%oname Summary: a collection of tools for internationalizing Python 3 applications Group: Development/Python3 %py3_requires pytz %description -n python3-module-%oname Babel is an integrated collection of utilities that assist in internationalizing and localizing Python applications, with an emphasis on web-based applications. The functionality Babel provides for internationalization (I18n) and localization (L10N) can be separated into two different aspects: * tools to build and work with gettext message catalogs, and * a Python interface to the CLDR (Common Locale Data Repository), providing access to various locale display names, localized number and date formatting, etc. %endif %prep %setup -a1 %if_with python3 rm -rf ../python3 cp -a . ../python3 %endif %prepare_sphinx . ln -s ../objects.inv docs/ %build python scripts/import_cldr.py CLDR/ %python_build %if_with python3 pushd ../python3 python scripts/import_cldr.py CLDR/ find -type f -name '*.py' -exec sed -i 's|%_bindir/env python|%_bindir/python3|' -- '{}' + find -type f -name '*.py' -exec 2to3 -w '{}' + %python3_build build_ext popd %endif %install %if_with python3 pushd ../python3 %python3_install popd mv %buildroot%_bindir/pybabel %buildroot%_bindir/pybabel3 %endif %python_install %make -C docs html %check python setup.py test %if_with python3 pushd ../python3 python3 setup.py test popd %endif %files %_bindir/pybabel %python_sitelibdir/babel/ %python_sitelibdir/*.egg-info %doc AUTHORS CHANGES README docs/_build/html %if_with python3 %files -n python3-module-%oname %doc AUTHORS CHANGES README docs/_build/html %_bindir/pybabel3 %python3_sitelibdir/babel/ %python3_sitelibdir/*.egg-info %endif %changelog * Mon Aug 31 2015 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.0-alt1.dev.git20150805 - Version 3.0-dev * Tue Oct 21 2014 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 2.0-alt1.dev.git20140407 - Version 2.0-dev * Tue Oct 21 2014 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0-alt1.svn20121012 - Version 1.0 * Mon Apr 15 2013 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 0.9.6-alt1.1 - Use 'find... -exec...' instead of 'for ... $(find...' * Thu Feb 21 2013 Aleksey Avdeev <solo@altlinux.ru> 0.9.6-alt1 - 0.9.6 * Thu May 10 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 0.9.5-alt1.2 - Added module for Python 3 * Mon Oct 24 2011 Vitaly Kuznetsov <vitty@altlinux.ru> 0.9.5-alt1.1 - Rebuild with Python-2.7 * Sat Aug 28 2010 Andrey Rahmatullin <wrar@altlinux.org> 0.9.5-alt1 - 0.9.5 - build from SVN - run tests - add pytz to Requires according to the upstream recommendation * Thu Nov 19 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 0.9.4-alt1.1 - Rebuilt with python 2.6 * Sun Oct 18 2009 Vladimir Lettiev <crux@altlinux.ru> 0.9.4-alt1 - initial build |