]>
Commit | Line | Data |
---|---|---|
571ea69a ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
3de44fe4 AM |
4 | |
5 | Summary: Implementation of Python 3 with very low memory footprint | |
6 | Name: micropython | |
ef06dcfd | 7 | Version: 1.18 |
3de44fe4 AM |
8 | Release: 1 |
9 | License: MIT | |
10 | Group: Development/Languages/Python | |
935203d9 | 11 | Source0: http://micropython.org/resources/source/%{name}-%{version}.tar.xz |
ef06dcfd | 12 | # Source0-md5: 134dcca4c286b8be9d2cc738809b7246 |
571ea69a | 13 | URL: http://micropython.org/ |
3de44fe4 | 14 | BuildRequires: libffi-devel |
ef06dcfd | 15 | BuildRequires: mbedtls-devel |
e8a8a667 ER |
16 | BuildRequires: pkgconfig |
17 | BuildRequires: python | |
18 | BuildRequires: python-modules | |
eb09b3f6 ER |
19 | %if %{with tests} |
20 | BuildRequires: python3 | |
21 | BuildRequires: python3-modules | |
22 | %endif | |
3de44fe4 | 23 | BuildRequires: readline-devel |
571ea69a | 24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3de44fe4 AM |
25 | |
26 | %description | |
571ea69a | 27 | Implementation of Python 3 with very low memory footprint. |
3de44fe4 AM |
28 | |
29 | %prep | |
30 | %setup -q | |
31 | ||
32 | %build | |
ef06dcfd AM |
33 | |
34 | # add -I/where/jni.h (do we have a method to get this dir?) is and MICROPY_PY_JNI=1 to make below | |
35 | ||
935203d9 | 36 | %{__make} -C ports/unix \ |
3de44fe4 | 37 | CC="%{__cc}" \ |
ef06dcfd AM |
38 | CFLAGS_EXTRA="%{rpmcppflags} %{rpmcflags} -Wno-error=maybe-uninitialized" \ |
39 | LDFLAGS_EXTRA="%{rpmldflags}" \ | |
40 | MICROPY_SSL_MBEDTLS=1 \ | |
41 | STRIP=true \ | |
3de44fe4 AM |
42 | V=1 |
43 | ||
935203d9 | 44 | %{?with_tests:%{__make} -C ports/unix test} |
3de44fe4 AM |
45 | |
46 | %install | |
47 | rm -rf $RPM_BUILD_ROOT | |
935203d9 | 48 | |
3de44fe4 | 49 | install -d $RPM_BUILD_ROOT%{_bindir} |
935203d9 | 50 | cp -a ports/unix/micropython $RPM_BUILD_ROOT%{_bindir} |
3de44fe4 AM |
51 | |
52 | %clean | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %files | |
56 | %defattr(644,root,root,755) | |
57 | %doc README.md | |
58 | %attr(755,root,root) %{_bindir}/micropython |