Package python-module-fudge: 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 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | %define oname fudge %def_without python3 Name: python-module-%oname Version: 1.0.3 Release: alt3 Summary: Replace real objects with fakes (mocks, stubs, etc) while testing License: MIT Group: Development/Python Url: https://pypi.python.org/pypi/fudge/ Packager: Eugeny A. Rostovtsev (REAL) <real at altlinux.org> Source: %name-%version.tar BuildArch: noarch BuildPreReq: python-devel python-module-setuptools-tests BuildPreReq: python-module-nose BuildPreReq: python-module-sphinx-devel %if_with python3 BuildRequires(pre): rpm-build-python3 BuildPreReq: python3-devel python3-module-setuptools-tests BuildPreReq: python3-module-nose BuildPreReq: python-tools-2to3 %endif %py_provides %oname %py_requires nose %description Fudge is a Python module for using fake objects (mocks and stubs) to test real ones. In readable Python code, you declare what methods are available on your fake and how they should be called. Then you inject that into your application and start testing. This declarative approach means you don't have to record and playback actions and you don't have to inspect your fakes after running code. If the fake object was used incorrectly then you'll see an informative exception message with a traceback that points to the culprit. %package tests Summary: Tests for %oname Group: Development/Python Requires: %name = %EVR %description tests Fudge is a Python module for using fake objects (mocks and stubs) to test real ones. In readable Python code, you declare what methods are available on your fake and how they should be called. Then you inject that into your application and start testing. This declarative approach means you don't have to record and playback actions and you don't have to inspect your fakes after running code. If the fake object was used incorrectly then you'll see an informative exception message with a traceback that points to the culprit. This package contains tests for %oname. %if_with python3 %package -n python3-module-%oname Summary: Replace real objects with fakes (mocks, stubs, etc) while testing Group: Development/Python3 %py3_provides %oname %py3_requires nose %description -n python3-module-%oname Fudge is a Python module for using fake objects (mocks and stubs) to test real ones. In readable Python code, you declare what methods are available on your fake and how they should be called. Then you inject that into your application and start testing. This declarative approach means you don't have to record and playback actions and you don't have to inspect your fakes after running code. If the fake object was used incorrectly then you'll see an informative exception message with a traceback that points to the culprit. %package -n python3-module-%oname-tests Summary: Tests for %oname Group: Development/Python3 Requires: python3-module-%oname = %EVR %description -n python3-module-%oname-tests Fudge is a Python module for using fake objects (mocks and stubs) to test real ones. In readable Python code, you declare what methods are available on your fake and how they should be called. Then you inject that into your application and start testing. This declarative approach means you don't have to record and playback actions and you don't have to inspect your fakes after running code. If the fake object was used incorrectly then you'll see an informative exception message with a traceback that points to the culprit. This package contains tests for %oname. %endif %package pickles Summary: Pickles for %oname Group: Development/Python %description pickles Fudge is a Python module for using fake objects (mocks and stubs) to test real ones. In readable Python code, you declare what methods are available on your fake and how they should be called. Then you inject that into your application and start testing. This declarative approach means you don't have to record and playback actions and you don't have to inspect your fakes after running code. If the fake object was used incorrectly then you'll see an informative exception message with a traceback that points to the culprit. This package contains pickles for %oname. %package docs Summary: Documentation for %oname Group: Development/Documentation BuildArch: noarch %description docs Fudge is a Python module for using fake objects (mocks and stubs) to test real ones. In readable Python code, you declare what methods are available on your fake and how they should be called. Then you inject that into your application and start testing. This declarative approach means you don't have to record and playback actions and you don't have to inspect your fakes after running code. If the fake object was used incorrectly then you'll see an informative exception message with a traceback that points to the culprit. This package contains documentation for %oname. %prep %setup %if_with python3 cp -fR . ../python3 find ../python3 -type f -name '*.py' -exec 2to3 -w -n '{}' + %endif %prepare_sphinx . ln -s ../objects.inv docs/ %build %python_build_debug %if_with python3 pushd ../python3 %python3_build_debug popd %endif %install %python_install %if_with python3 pushd ../python3 %python3_install popd %endif %make -C docs pickle %make -C docs html cp -fR docs/_build/pickle %buildroot%python_sitelibdir/%oname/ # There is a file in the package with a name starting with <tt>._</tt>, # the file name pattern used by Mac OS X to store resource forks in non-native # file systems. Such files are generally useless in packages and were usually # accidentally included by copying complete directories from the source tarball. find $RPM_BUILD_ROOT -name '._*' -size 1 -print0 | xargs -0 grep -lZ 'Mac OS X' -- | xargs -0 rm -f # for ones installed as %%doc find . -name '._*' -size 1 -print0 | xargs -0 grep -lZ 'Mac OS X' -- | xargs -0 rm -f %check python setup.py test rm -fR build py.test -vv %if_with python3 pushd ../python3 python3 setup.py test rm -fR build py.test-%_python3_version -vv popd %endif %files %doc *.txt javascript %python_sitelibdir/* %exclude %python_sitelibdir/*/pickle %exclude %python_sitelibdir/*/tests %files tests %python_sitelibdir/*/tests %files pickles %python_sitelibdir/*/pickle %files docs %doc docs/_build/html/* %if_with python3 %files -n python3-module-%oname %doc *.txt javascript %python3_sitelibdir/* %exclude %python3_sitelibdir/*/tests %files -n python3-module-%oname-tests %python3_sitelibdir/*/tests %endif %changelog * Mon Mar 02 2015 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.3-alt3 - Fixed build * Sat Jan 17 2015 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.3-alt2 - Applied repocop's python-module-fudge-1.0.3-alt1.diff * Fri Jan 16 2015 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.3-alt1 - Initial build for Sisyphus |