This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpython3.cygport
185 lines (173 loc) · 5.33 KB
/
python3.cygport
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
NAME="python36"
VERSION=3.6.9
RELEASE=1
CATEGORY="Python Interpreters"
SUMMARY="Py3K language interpreter"
DESCRIPTION="Python is an interpreted, interactive, object-oriented programming
language. It incorporates modules, exceptions, dynamic typing, very high level
dynamic data types, and classes. Python combines remarkable power with very
clear syntax. It has interfaces to many system calls and libraries, as well as
to various window systems, and is extensible in C or C++. It is also usable as
an extension language for applications that need a programmable interface."
HOMEPAGE="http://www.python.org/"
SRC_URI="http://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tar.xz"
SRC_DIR="Python-${VERSION}"
PATCH_URI="
00189-use-rpm-wheels.patch
3.4-dbm-cygwin.patch
3.1-enable-new-dtags.patch
3.4-tkinter-cygwin.patch
3.4-ctypes-cygwin.patch
3.1-ncurses-abi6.patch
3.2-export-PySignal_SetWakeupFd.patch
3.4-distutils-soname.patch
3.2-distutils-shlibext.patch
3.4-pep3149-cygwin.patch
3.6-thread-cygwin64.patch
3.2-getpath-exe-extension.patch
3.4-select-cygwin.patch
3.4-signal-cygwin.patch
3.4-struct-cygwin.patch
3.4-shebang.patch
3.6-ftm.patch
3.6-nis-cygwin.patch
"
# 3.0b3-ossaudio.patch
slot=${PV:0:3}
abi=${slot}m
pyrootdir=/usr/lib/python${slot}
pyconfdir=${pyrootdir}/config-${abi}-${ARCH/i6/i3}-cygwin
pydylddir=${pyrootdir}/lib-dynload
PKG_NAMES="${NAME} ${NAME}-devel ${NAME}-test ${NAME}-tkinter idle${slot//.}"
python36_REQUIRES="binutils libuuid-devel" # ctypes.util.find_library, uuid.py
python36_REQUIRES+=" python-pip-wheel python-setuptools-wheel" # ensurepip
python36_CONTENTS="
--exclude=idle3* --exclude=idlelib
--exclude=_tkinter*.dll --exclude=tkinter --exclude=turtle*
--exclude=${pyrootdir#/}/*/test
--exclude=${pyrootdir#/}/*/tests
--exclude=*_test*.dll
usr/bin/libpython${abi}.dll
usr/bin/pydoc${slot}
usr/bin/python${slot}
usr/bin/python${abi}.exe
usr/bin/pyvenv-${slot}
usr/include/python${abi}/pyconfig.h
${pydylddir#/}/
${pyrootdir#/}/asyncio/
${pyrootdir#/}/collections/
${pyrootdir#/}/concurrent/
${pyconfdir#/}/Makefile
${pyrootdir#/}/ctypes/
${pyrootdir#/}/curses/
${pyrootdir#/}/dbm/
${pyrootdir#/}/distutils/
${pyrootdir#/}/email/
${pyrootdir#/}/encodings/
${pyrootdir#/}/ensurepip/
${pyrootdir#/}/html/
${pyrootdir#/}/http/
${pyrootdir#/}/importlib/
${pyrootdir#/}/json/
${pyrootdir#/}/lib2to3/
${pyrootdir#/}/logging/
${pyrootdir#/}/multiprocessing/
${pyrootdir#/}/pydoc_data/
${pyrootdir#/}/site-packages/
${pyrootdir#/}/sqlite3/
${pyrootdir#/}/test/__init__.py
${pyrootdir#/}/test/__pycache__/__init__.*
${pyrootdir#/}/test/support/
${pyrootdir#/}/unittest/
${pyrootdir#/}/urllib/
${pyrootdir#/}/venv/
${pyrootdir#/}/wsgiref/
${pyrootdir#/}/xml/
${pyrootdir#/}/xmlrpc/
${pyrootdir#/}/*.py
${pyrootdir#/}/__pycache__/
usr/share/doc/${NAME}/
usr/share/man/man1/python${slot}.1*
var/lib/rebase/dynpath.d/${NAME}
"
python36_devel_REQUIRES="python${slot/.}-setuptools libcrypt-devel"
python36_devel_CONTENTS="
--exclude=usr/include/python${abi}/pyconfig.h
--exclude=${pyconfdir#/}/Makefile
usr/bin/2to3-${slot}
usr/bin/python${slot}*-config
usr/include/python${abi}/
${pyconfdir#/}/
usr/lib/libpython${slot}*.dll.a
usr/lib/pkgconfig/python-${slot}.pc
"
idle36_SUMMARY="Py3K Tkinter_based IDE"
idle36_REQUIRES="${NAME}-tkinter"
idle36_CONTENTS="
--exclude=idle_test
etc/
usr/bin/idle${slot}
${pyrootdir#/}/idlelib/
${pyrootdir#/}/turtledemo/
usr/share/applications/idle${slot}.desktop
usr/share/icons/hicolor/*/apps/idle${slot//.}.png
"
python36_test_SUMMARY="Py3K tests"
python36_test_CONTENTS="
--exclude=${pyrootdir#/}/test/__init__.py
--exclude=${pyrootdir#/}/test/__pycache__/__init__.*
--exclude=${pyrootdir#/}/test/support
${pydylddir#/}/*_test*.dll
${pyrootdir#/}/ctypes/test/
${pyrootdir#/}/distutils/tests/
${pyrootdir#/}/idlelib/idle_test/
${pyrootdir#/}/lib2to3/tests/
${pyrootdir#/}/sqlite3/test/
${pyrootdir#/}/test/
${pyrootdir#/}/tkinter/test/
${pyrootdir#/}/unittest/test/
"
python36_tkinter_SUMMARY="Py3K Tkinter GUI module"
python36_tkinter_REQUIRES="tcl-tix"
python36_tkinter_CONTENTS="
--exclude=test
${pydylddir#/}/_tkinter*
${pyrootdir#/}/tkinter/
${pyrootdir#/}/turtle.py
${pyrootdir#/}/__pycache__/turtle.*
"
PKG_IGNORE="usr/share/man/man1/python3.1*"
REQUIRES_EXCLUDE_FROM="*/distutils/command/*:*/lib2to3/tests/data/*:*/test/*"
DIFF_EXCLUDES="pyconfig.h.in"
# for 00189-use-rpm-wheels.patch
DISTCLEANFILES="Lib/ensurepip/_bundled/*.whl"
NO_AUTOHEADER=1
CYGCONF_ARGS="
--enable-shared
--enable-ipv6
--with-dbmliborder=gdbm
--with-libc=
--with-libm=
--with-system-expat
--with-system-ffi
--without-ensurepip
ac_cv_func_bind_textdomain_codeset=yes
"
src_install() {
cd ${B}
dodir /usr
cygmake -j1 DESTDIR=${D} altinstall maninstall
rm -f ${D}${pyrootdir}/LICENSE.txt
dosym python${abi}-config /usr/bin/python${slot}-config
dosym ${pyconfdir#/usr/lib/}/libpython${abi}.dll.a /usr/lib/libpython${abi}.dll.a
dosym ${pyconfdir#/usr/lib/}/libpython${abi}.dll.a /usr/lib/libpython${slot}.dll.a
sed -i -e '1 s/\.exe//' ${D}/usr/bin/*${slot}
for i in 16 32 48
do
insinto /usr/share/icons/hicolor/${i}x${i}/apps
newins ${S}/Lib/idlelib/Icons/idle_${i}.png idle${slot//.}.png
done
make_desktop_entry idle${slot} "IDLE ${slot}" idle${slot//.} "Development;IDE"
dodir /var/lib/rebase/dynpath.d
echo ${pyrootdir}/site-packages > ${D}/var/lib/rebase/dynpath.d/${NAME}
}