]> git.pld-linux.org Git - packages/micropython.git/blob - micropython.spec
Up to 1.18.
[packages/micropython.git] / micropython.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 Summary:        Implementation of Python 3 with very low memory footprint
6 Name:           micropython
7 Version:        1.18
8 Release:        1
9 License:        MIT
10 Group:          Development/Languages/Python
11 Source0:        http://micropython.org/resources/source/%{name}-%{version}.tar.xz
12 # Source0-md5:  134dcca4c286b8be9d2cc738809b7246
13 URL:            http://micropython.org/
14 BuildRequires:  libffi-devel
15 BuildRequires:  mbedtls-devel
16 BuildRequires:  pkgconfig
17 BuildRequires:  python
18 BuildRequires:  python-modules
19 %if %{with tests}
20 BuildRequires:  python3
21 BuildRequires:  python3-modules
22 %endif
23 BuildRequires:  readline-devel
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 Implementation of Python 3 with very low memory footprint.
28
29 %prep
30 %setup -q
31
32 %build
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
36 %{__make} -C ports/unix \
37         CC="%{__cc}" \
38         CFLAGS_EXTRA="%{rpmcppflags} %{rpmcflags} -Wno-error=maybe-uninitialized" \
39         LDFLAGS_EXTRA="%{rpmldflags}" \
40         MICROPY_SSL_MBEDTLS=1 \
41         STRIP=true \
42         V=1
43
44 %{?with_tests:%{__make} -C ports/unix test}
45
46 %install
47 rm -rf $RPM_BUILD_ROOT
48
49 install -d $RPM_BUILD_ROOT%{_bindir}
50 cp -a ports/unix/micropython $RPM_BUILD_ROOT%{_bindir}
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
This page took 0.251384 seconds and 3 git commands to generate.