Search
SailfishOS Open Build Service
>
Projects
>
home:eenemo
:
branches:mer:mds2:Core:i486:master
>
python3
> python3.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File python3.spec of Package python3
# # Do NOT Edit the Auto-generated Part! # Generated by: spectacle version 0.26 # Name: python3 # >> macros %global pybasever 3.3 %global pyshortver 33 %global pylibdir %{_libdir}/python%{pybasever} %global dynload_dir %{pylibdir}/lib-dynload # set this to 0/1 to turn off/on the "check" phase: #or use qemu_user_space_build flag? %global run_check 0 ##global qemu_user_space_build 0 #default __os_install_post uses brp-python-bytecompile. #it uses default python, not this version. #symptom: build log shows incorrect magic numbers in .pyc #oh, we don't bother with find-docs.sh %global __os_install_post /usr/lib/rpm/brp-compress \ /usr/lib/rpm/brp-strip %{__strip} \ /usr/lib/rpm/brp-strip-static-archive %{__strip} \ /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \ /usr/lib/rpm/brp-python-hardlink #%%{nil} # << macros Summary: An interpreted, interactive, object-oriented programming language Version: 3.3.2 Release: 1 Group: Development/Languages License: Python URL: http://www.python.org/ Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz Source1: macros.python3 Source100: python3.yaml Patch0: cgi-py-shebang.patch Patch1: notimestamp.patch BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(ncursesw) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(sqlite3) BuildRequires: bzip2 BuildRequires: bzip2-devel BuildRequires: db4-devel BuildRequires: gdbm-devel BuildRequires: readline-devel Provides: python3-abi = %{pybasever} %description Python 3 is a new version of the language that is incompatible with the 2.x line of releases. The language is mostly the same, but many details, especially how built-in objects like dictionaries and strings work, have changed considerably, and a lot of deprecated features have finally been removed. This package provides the "python3" executable; most of the actual implementation is within the "python3-libs" package. %package libs Summary: Python 3 runtime libraries Group: Applications/System Requires: %{name} = %{version}-%{release} Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig %description libs This package contains runtime libraries for use by Python 3 %package test Summary: The test modules from the main python3 package Group: Development/Languages Requires: %{name} = %{version}-%{release} %description test The test modules from the main python 3 package These are in a separate package to save space, as they are never or almost never used in production. You might want to install the python3-test package if you are developing python code that uses more than just unittest and/or support.py. %package tools Summary: A collection of development tools included with Python Group: Development/Tools Requires: %{name} = %{version}-%{release} Provides: python3-tools = %{version} Obsoletes: python3-tools < %{version} %description tools This package includes several tools to help with the development of Python 3 programs. %package devel Summary: The libraries and header files needed for Python 3 development Group: Development/Libraries Requires: %{name} = %{version}-%{release} Provides: python3-devel = %{version}-%{release} Obsoletes: python3-devel < %{version}-%{release} %description devel The Python 3 programming language's interpreter can be extended with dynamically loaded extensions and can be embedded in other programs. This package contains the header files and libraries needed to do these types of tasks. %prep %setup -q -n Python-%{version} # cgi-py-shebang.patch %patch0 -p1 # notimestamp.patch %patch1 -p1 # >> setup # Remove embedded copy of libffi: for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx ; do rm -r Modules/_ctypes/$SUBDIR || exit 1 ; done # << setup %build # >> build pre # << build pre %configure --disable-static \ --enable-ipv6 \ --enable-shared \ --with-system-ffi make %{?jobs:-j%jobs} # >> build post %if 0%{run_check} #have to test pre-installed here (or can we move yaml's check up here)? echo STARTING: CHECKING OF PYTHON echo NOTE: the test suite is run against BUILD and .py source files, not BUILDROOT echo arch is "%{_arch}" echo buildarch is "%{_build_arch}" #skip failing tests (FAIL or crash (seg fault, etc)). #otherwise rpmbuild will bomb (make test exits w/ non-zero status). #test_tcl skipped -- No module named _tkinter #they would show up as skips unexpected on linux otherwise #[but are not fatal to the build] #test_codecmaps skipped; also they access remote url #fetching http://people.freebsd.org/~perky/i18n/BIG5HKSCS-2004.TXT ... # #FAILED (errors=1, skipped=69) #test test_socket failed[249/371/1] test_socket #FAILED (errors=2, skipped=14) #test test_distutils failed[264/371/2] test_distutils #test_dbm fails randomly [1st run, then not during verbose 2nd run?] ALWAYS_EXCLUDED_TESTS=" \ test_tcl \ test_tk \ test_ttk_guionly \ test_ttk_textonly \ test_codecmaps_cn \ test_codecmaps_hk \ test_codecmaps_jp \ test_codecmaps_kr \ test_codecmaps_tw \ test_dbm \ test_distutils \ test_socket \ %{nil}" #scratchbox2 (i.e., non-native?) builds may cause several unexpected failures #or skips SB2_EXCLUDED=" \ %{nil}" %ifarch %{arm} echo "testing: ifarch is arm" ARCH_EXCLUDED="\ $SB2_EXCLUDED \ %{nil}" %endif %ifarch %{mipsel} echo "testing: ifarch is mipsel" ARCH_EXCLUDED="\ $SB2_EXCLUDED \ %{nil}" %endif %ifarch %{ix86} ARCH_EXCLUDED="\ %{nil}" %endif %ifarch x86_64 ARCH_EXCLUDED="\ %{nil}" %endif EXCLUDED_TESTS=" \ $ALWAYS_EXCLUDED_TESTS \ $ARCH_EXCLUDED \ %{nil}" # Note that we're running the tests using the version of the code in the # builddir, not in the buildroot. #sb2/qemu may be unstable... %if ! 0%{?qemu_user_space_build} echo "the EXCLUDED tests were: $EXCLUDED_TESTS" EXTRATESTOPTS="--verbose3" # Actually invoke regrtest.py: EXTRATESTOPTS="$EXTRATESTOPTS -x $EXCLUDED_TESTS" make test echo FINISHED: CHECKING OF PYTHON echo add any failing tests to arch-specific EXCLUDED_TESTS echo to allow package build to succeed %endif #qemu %endif # run_check # << build post %install rm -rf %{buildroot} # >> install pre # << install pre %make_install # >> install post # python's build is stupid and doesn't fail if extensions fail to build # let's list a few that we care(?) about... for so in _bz2 _ctypes _curses _elementtree _hashlib _lzma pyexpat readline _sqlite3 _ssl zlib ; do soname=${so}.cpython-%{pyshortver}m.so if [ ! -f %{buildroot}/%{dynload_dir}/$soname ]; then echo %{buildroot}/%{dynload_dir} /bin/ls -l %{buildroot}/%{dynload_dir} echo "Missing $soname!!!" exit 1 fi done #tk not supported rm -rf %{buildroot}%{pylibdir}/tkinter rm -rf %{buildroot}%{pylibdir}/idlelib rm -f %{buildroot}%{_bindir}/idle%{pybasever} rm -f %{buildroot}%{_bindir}/idle3 rm -rf %{buildroot}%{pylibdir}/turtledemo rm -f %{buildroot}%{pylibdir}/turtle.py rm -rf %{buildroot}%{pylibdir}/__pycache__/turtle.* #we already have a LICENSE file elsewhere rm -f %{buildroot}%{pylibdir}/LICENSE.txt #2to3 needs a more descriptive name mv %{buildroot}%{_bindir}/2to3 %{buildroot}%{_bindir}/python3-2to3 # Get rid of DOS batch files: find %{buildroot} -name \*.bat -exec rm {} \; # a test-only fake file? rm -rf %{buildroot}%{pylibdir}/__pycache__/__phello__.* echo "NOTE: using os_install_post as defined in spec file" #TODO: #remove shebang from some .py files, chmod -x other .py files #python3-test.i486: W: non-executable-script /usr/lib/python3.3/test/multibytecodec_support.py 0644L /usr/bin/env # << install post %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc LICENSE README %{_bindir}/pydoc3* %{_bindir}/python3 %{_bindir}/python%{pybasever} %{_bindir}/python%{pybasever}m %{_bindir}/pyvenv %{_bindir}/pyvenv-%{pybasever} %{_mandir}/*/* # >> files # << files %files libs %defattr(-,root,root,-) %dir %{pylibdir} %dir %{dynload_dir} %{dynload_dir}/*.so #warning, hardwired SOVERSION 1.0 %{_libdir}/libpython%{pybasever}m.so.1.0 %{_libdir}/libpython%{pybasever}m.so %{_libdir}/libpython3.so %dir %{pylibdir}/site-packages %{pylibdir}/site-packages/README %{pylibdir}/*.py %{pylibdir}/__pycache__ #see -tests pkg for others %dir %{pylibdir}/test %dir %{pylibdir}/test/__pycache__ %{pylibdir}/test/__init__.py %{pylibdir}/test/support.py %{pylibdir}/test/__pycache__/__init__.* %{pylibdir}/test/__pycache__/support.* %{pylibdir}/collections %{pylibdir}/concurrent %{pylibdir}/ctypes %exclude %{pylibdir}/ctypes/test %{pylibdir}/curses %{pylibdir}/dbm %{pylibdir}/distutils %exclude %{pylibdir}/distutils/tests %{pylibdir}/email %exclude %{pylibdir}/email/architecture.rst %doc %{pylibdir}/email/architecture.rst %{pylibdir}/encodings %{pylibdir}/html %{pylibdir}/http %{pylibdir}/importlib %{pylibdir}/json %{pylibdir}/lib2to3 %exclude %{pylibdir}/lib2to3/tests %{pylibdir}/logging %{pylibdir}/multiprocessing %{pylibdir}/plat-linux %{pylibdir}/pydoc_data %{pylibdir}/sqlite3 %exclude %{pylibdir}/sqlite3/test %{pylibdir}/unittest %exclude %{pylibdir}/unittest/test %{pylibdir}/urllib %{pylibdir}/venv %{pylibdir}/wsgiref %{pylibdir}/xml %{pylibdir}/xmlrpc #needed by distutils %dir %{pylibdir}/config-%{pybasever}m %{pylibdir}/config-%{pybasever}m/Makefile %dir %{_includedir}/python%{pybasever}m %{_includedir}/python%{pybasever}m/pyconfig.h # >> files libs # << files libs %files test %defattr(-,root,root,-) %{pylibdir}/test %exclude %{pylibdir}/test/__init__.py %exclude %{pylibdir}/test/support.py %exclude %{pylibdir}/test/__pycache__/__init__.* %exclude %{pylibdir}/test/__pycache__/support.* %{pylibdir}/ctypes/test %{pylibdir}/distutils/tests %{pylibdir}/lib2to3/tests %{pylibdir}/sqlite3/test %{pylibdir}/unittest/test # >> files test # << files test %files tools %defattr(-,root,root,-) %{_bindir}/python3-2to3 %{_bindir}/2to3-%{pybasever} # >> files tools # << files tools %files devel %defattr(-,root,root,-) %{_bindir}/python3-config %{_bindir}/python%{pybasever}-config %{_bindir}/python%{pybasever}m-config %{_libdir}/pkgconfig/python3.pc %{_libdir}/pkgconfig/python-%{pybasever}.pc %{_libdir}/pkgconfig/python-%{pybasever}m.pc %{pylibdir}/config-%{pybasever}m %exclude %{pylibdir}/config-%{pybasever}m/Makefile %{_includedir}/python%{pybasever}m/*.h %exclude %{_includedir}/python%{pybasever}m/pyconfig.h # >> files devel # << files devel