Package python-module-imagesize: 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 | %define py_name imagesize Name: python-module-%py_name Version: 1.1.0 Release: alt1 Group: Development/Python %global short_desc Getting image size from png/jpeg/jpeg2000/gif file in pure Python Summary: %short_desc License: MIT Url: https://github.com/shibukawa/imagesize_py # https://github.com/shibukawa/imagesize_py Source0: %name-%version.tar BuildArch: noarch BuildRequires(pre): rpm-build-python3 BuildPreReq: python-module-setuptools BuildPreReq: python3-module-setuptools # For %%check: BuildPreReq: python-module-nose BuildPreReq: python3-module-nose %global long_desc It parses image files' header and return image size.\ \ * PNG\ * JPEG\ * JPEG2000\ * GIF %description %long_desc This is a pure Python2 library. %package -n python3-module-%py_name Group: Development/Python3 Summary: %short_desc %description -n python3-module-%py_name %long_desc This is a pure Python3 library. %prep %setup -c for py in py2 py3; do cp -a %name-%version "$py" done %build pushd py2 %python_build popd pushd py3 %python3_build popd %install pushd py2 %python_install popd pushd py3 %python3_install popd %check cd %name-%version # Just in case: # make sure we test the installed modules from %%buildroot, rm imagesize.py [ -n "$NOSE_PROCESSES" ] || NOSE_PROCESSES=%__nprocs; export NOSE_PROCESSES # like in %%make_build PYTHONPATH=%buildroot%python_sitelibdir nosetests test PYTHONPATH=%buildroot%python3_sitelibdir nosetests3 test %files %doc py2/{LICENSE,README}.rst %python_sitelibdir/* %files -n python3-module-%py_name %doc py3/{LICENSE,README}.rst %python3_sitelibdir/* %changelog * Mon May 06 2019 Grigory Ustinov <grenka@altlinux.org> 1.1.0-alt1 - Build new version. * Tue Apr 30 2019 Grigory Ustinov <grenka@altlinux.org> 0.7.1-alt1.1 - Rebuild with python3.7. * Sat Apr 23 2016 Ivan Zakharyaschev <imz@altlinux.org> 0.7.1-alt1 - upstream release 0.7.1 (no changes) * Thu Apr 21 2016 Ivan Zakharyaschev <imz@altlinux.org> 0.7.0-alt1 - Initial build for ALT Sisyphus. (Needed for sphinx-1.4.1.) (ALT#31976) - The same source is used for both Python{2,3} with a commit from: https://github.com/xantares/imagesize_py/tree/py2a3 |