python3.7
This commit is contained in:
parent
f4adf833dd
commit
7cec6d24b4
|
@ -0,0 +1,20 @@
|
|||
# Tanım: DBUS için Python bağları
|
||||
# URL: http://dbus.freedesktop.org/
|
||||
# Paketçi: milisarge
|
||||
# Gerekler: python3 dbus-glib
|
||||
# Grup: kütüphane
|
||||
|
||||
isim=python3-dbus
|
||||
surum=1.2.8
|
||||
devir=1
|
||||
kaynak=(https://dbus.freedesktop.org/releases/dbus-python/dbus-python-${surum}.tar.gz)
|
||||
|
||||
derle() {
|
||||
cd dbus-python-$surum
|
||||
mkdir python3
|
||||
cd python3
|
||||
PYTHON=/usr/bin/python3 \
|
||||
../configure --prefix=/usr
|
||||
cd ..
|
||||
make DESTDIR=$PKG -C python3 install
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
# Tanım: Çapraz platform Python, OpenGL ve ilgili API'lere bağlanır.
|
||||
# URL: http://pyopengl.sourceforge.net/
|
||||
# Paketçi: alihan-ozturk28@hotmail.com
|
||||
# Paketçi: milisarge
|
||||
# Gerekler: python3 freeglut python3-setuptools
|
||||
# Grup: kütüphane
|
||||
|
||||
isim=python3-opengl
|
||||
surum=3.1.0
|
||||
devir=1
|
||||
devir=2
|
||||
|
||||
kaynak=( https://pypi.python.org/packages/source/P/PyOpenGL/PyOpenGL-$surum.tar.gz)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Grup: kütüphane
|
||||
|
||||
isim=python3-pillow
|
||||
surum=4.2.1
|
||||
surum=5.2.0
|
||||
_sanever=2.8.3
|
||||
_appisim=Pillow
|
||||
devir=1
|
||||
|
@ -23,8 +23,8 @@ derle() {
|
|||
cd Sane
|
||||
python3 setup.py install --prefix=/usr --root=$PKG
|
||||
cd ../libImaging
|
||||
install -dm755 $PKG/usr/include/python3.5m
|
||||
install -m644 -t $PKG/usr/include/python3.5m *.h
|
||||
install -dm755 $PKG/usr/include/"$(basename `ls -d /usr/lib/python3*`)"m
|
||||
install -m644 -t $PKG/usr/include/"$(basename `ls -d /usr/lib/python3*`)"m *.h
|
||||
|
||||
cd $PKG/usr/bin
|
||||
for f in *.py; do
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
# Tanım: Python-pip (pypi python paketlerini yüklemek için kolay kurulum değiştirme)
|
||||
# Tanım: Pypi python paketlerini yüklemek için kolay kurulum değiştirme
|
||||
# URL: http://www.pip-installer.org
|
||||
# Paketçi: milisarge
|
||||
# Gerekler: python3 python3-setuptools
|
||||
# Grup: sistem
|
||||
|
||||
isim=python3-pip
|
||||
surum=9.0.1
|
||||
surum=18.0
|
||||
devir=1
|
||||
|
||||
kaynak=(https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz)
|
||||
kaynak=(https://github.com/pypa/pip/archive/${surum}.tar.gz::pip-$surum.tar.gz)
|
||||
|
||||
derle() {
|
||||
cd pip-$surum
|
||||
python3 setup.py install --prefix=/usr --root=$PKG
|
||||
|
||||
mkdir -p $PKG/usr/share/doc/$isim-$surum
|
||||
cp -Rf docs/* $PKG/usr/share/doc/$isim-$surum
|
||||
cd $SRC/pip-$surum
|
||||
mv src/pip/_vendor/__init__.py /tmp
|
||||
rm -rf src/pip/_vendor/*
|
||||
mv /tmp/__init__.py src/pip/_vendor/
|
||||
sed -i 's/DEBUNDLED = False/DEBUNDLED = True/' src/pip/_vendor/__init__.py
|
||||
python3 setup.py build
|
||||
python3 setup.py install --prefix=/usr --root="$PKG"
|
||||
install -D -m644 LICENSE.txt $PKG/usr/share/licenses/$isim/LICENSE
|
||||
rm $PKG/usr/bin/pip
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# Tanım: Qt5 için bağlayıcı python
|
||||
# URL: https://sourceforge.net/projects/pyqt/f
|
||||
# Paketçi: milisarge
|
||||
# Gerekler: dbus-python python3-sip qt5 qt5-webkit python3-opengl python3 qt5-webengine
|
||||
# Gerekler: python3-dbus python3-sip qt5 qt5-webkit python3-opengl python3 qt5-webengine
|
||||
# Grup: kütüphane
|
||||
|
||||
isim=python3-qt5
|
||||
surum=5.9
|
||||
surum=5.9.2
|
||||
devir=1
|
||||
|
||||
kaynak=(http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-$surum/PyQt5_gpl-$surum.tar.gz)
|
||||
|
@ -16,7 +16,7 @@ python3 configure.py \
|
|||
-q /usr/bin/qmake-qt5 \
|
||||
--confirm-license \
|
||||
--no-sip-files \
|
||||
--qsci-api
|
||||
--qsci-api --verbose
|
||||
|
||||
find -name 'Makefile' | xargs sed -i 's|-Wl,-rpath,/usr/lib||g;s|-Wl,-rpath,.* ||g'
|
||||
make
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
# Grup: sistem
|
||||
|
||||
isim=python3-setuptools
|
||||
surum=36.0.1
|
||||
surum=40.0.0
|
||||
devir=1
|
||||
|
||||
kaynak=(https://files.pythonhosted.org/packages/source/${name:8:1}/${name#*-}/${name#*-}-$surum.zip)
|
||||
kaynak=(https://files.pythonhosted.org/packages/source/${isim:8:1}/${isim#*-}/${isim#*-}-$surum.zip)
|
||||
|
||||
derle() {
|
||||
cd ${name#*-}-$surum
|
||||
cd ${isim#*-}-$surum
|
||||
export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
|
||||
python3 bootstrap.py
|
||||
python3 setup.py build
|
||||
|
|
|
@ -5,19 +5,20 @@
|
|||
# Grup: kütüphane
|
||||
|
||||
isim=python3-sip
|
||||
surum=4.19.3
|
||||
surum=4.19.12
|
||||
devir=1
|
||||
|
||||
kaynak=(http://sourceforge.net/projects/pyqt/files/sip/sip-$surum/sip-$surum.tar.gz )
|
||||
|
||||
derle() {
|
||||
pysurum="$(basename `ls -d /usr/lib/python3*`)"
|
||||
cd sip-$surum
|
||||
python3 configure.py -b /usr/bin \
|
||||
-d /usr/lib/python3.5/site-packages \
|
||||
-e /usr/include/python3.5* \
|
||||
-d /usr/lib/$pysurum/site-packages \
|
||||
-e /usr/include/$pysurum* \
|
||||
-v /usr/share/sip
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
chmod 644 $PKG/usr/lib/python3.5/site-packages/sipdistutils.py
|
||||
chmod 644 $PKG/usr/lib/$pysurum/site-packages/sipdistutils.py
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
From 7bd6f0e5500f778e940374237b94651f60ae1990 Mon Sep 17 00:00:00 2001
|
||||
From: "Miss Islington (bot)"
|
||||
<31488909+miss-islington@users.noreply.github.com>
|
||||
Date: Fri, 6 Jul 2018 21:00:45 -0700
|
||||
Subject: [PATCH] closes bpo-34056: Always return bytes from
|
||||
_HackedGetData.get_data(). (GH-8130)
|
||||
|
||||
* Always return bytes from _HackedGetData.get_data().
|
||||
|
||||
Ensure the imp.load_source shim always returns bytes by reopening the file in
|
||||
binary mode if needed. Hash-based pycs have to receive the source code in bytes.
|
||||
|
||||
It's tempting to change imp.get_suffixes() to always return 'rb' as a mode, but
|
||||
that breaks some stdlib tests and likely 3rdparty code, too.
|
||||
(cherry picked from commit b0274f2cddd36b49fe5080efbe160277ef546471)
|
||||
|
||||
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
||||
---
|
||||
Lib/imp.py | 13 ++++++-------
|
||||
Lib/test/test_imp.py | 15 +++++++++++++++
|
||||
2 files changed, 21 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/Lib/imp.py b/Lib/imp.py
|
||||
index 866464b245b2..31f8c766381a 100644
|
||||
--- a/Lib/imp.py
|
||||
+++ b/Lib/imp.py
|
||||
@@ -142,17 +142,16 @@ def __init__(self, fullname, path, file=None):
|
||||
def get_data(self, path):
|
||||
"""Gross hack to contort loader to deal w/ load_*()'s bad API."""
|
||||
if self.file and path == self.path:
|
||||
+ # The contract of get_data() requires us to return bytes. Reopen the
|
||||
+ # file in binary mode if needed.
|
||||
if not self.file.closed:
|
||||
file = self.file
|
||||
- else:
|
||||
- self.file = file = open(self.path, 'r')
|
||||
+ if 'b' not in file.mode:
|
||||
+ file.close()
|
||||
+ if self.file.closed:
|
||||
+ self.file = file = open(self.path, 'rb')
|
||||
|
||||
with file:
|
||||
- # Technically should be returning bytes, but
|
||||
- # SourceLoader.get_code() just passed what is returned to
|
||||
- # compile() which can handle str. And converting to bytes would
|
||||
- # require figuring out the encoding to decode to and
|
||||
- # tokenize.detect_encoding() only accepts bytes.
|
||||
return file.read()
|
||||
else:
|
||||
return super().get_data(path)
|
||||
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py
|
||||
index a115e60d4e4f..bb0144b12d41 100644
|
||||
--- a/Lib/test/test_imp.py
|
||||
+++ b/Lib/test/test_imp.py
|
||||
@@ -2,6 +2,7 @@
|
||||
import importlib.util
|
||||
import os
|
||||
import os.path
|
||||
+import py_compile
|
||||
import sys
|
||||
from test import support
|
||||
from test.support import script_helper
|
||||
@@ -350,6 +351,20 @@ def test_pyc_invalidation_mode_from_cmdline(self):
|
||||
res = script_helper.assert_python_ok(*args)
|
||||
self.assertEqual(res.out.strip().decode('utf-8'), expected)
|
||||
|
||||
+ def test_find_and_load_checked_pyc(self):
|
||||
+ # issue 34056
|
||||
+ with support.temp_cwd():
|
||||
+ with open('mymod.py', 'wb') as fp:
|
||||
+ fp.write(b'x = 42\n')
|
||||
+ py_compile.compile(
|
||||
+ 'mymod.py',
|
||||
+ doraise=True,
|
||||
+ invalidation_mode=py_compile.PycInvalidationMode.CHECKED_HASH,
|
||||
+ )
|
||||
+ file, path, description = imp.find_module('mymod', path=['.'])
|
||||
+ mod = imp.load_module('mymod', file, path, description)
|
||||
+ self.assertEqual(mod.x, 42)
|
||||
+
|
||||
|
||||
class ReloadTests(unittest.TestCase):
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index ce2c0aa..7d6dcf7 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -60,7 +60,7 @@ INSTALL_DATA= @INSTALL_DATA@
|
||||
# Shared libraries must be installed with executable mode on some systems;
|
||||
# rather than figuring out exactly which, we always give them executable mode.
|
||||
# Also, making them read-only seems to be a good idea...
|
||||
-INSTALL_SHARED= ${INSTALL} -m 555
|
||||
+INSTALL_SHARED= ${INSTALL} -m 755
|
||||
|
||||
MKDIR_P= @MKDIR_P@
|
||||
|
|
@ -1 +0,0 @@
|
|||
configure uses pkgconfig to find libffi. There is a circular dependency here: Pkgconfig requires Glib which requires Python 2. there is a circular dependency with the Tk package as it requires Xorg to be installed but parts of Xorg depend on Python
|
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB |
|
@ -1,69 +1,66 @@
|
|||
# Tanım: Sonraki nesil python üst düzey betik dili
|
||||
# URL: http://www.python.org
|
||||
# Paketçi: milisarge
|
||||
# Gerekler: sqlite
|
||||
# Gerekler: sqlite libffi tk
|
||||
# Grup: geliştirme
|
||||
|
||||
isim=python3
|
||||
surum=3.5.1
|
||||
surum=3.7.0
|
||||
devir=1
|
||||
|
||||
kaynak=(
|
||||
http://www.python.org/ftp/python/$surum/Python-$surum.tar.xz
|
||||
python3.png)
|
||||
|
||||
docsurum=3.5.0a3
|
||||
kaynak=(http://www.python.org/ftp/python/$surum/Python-$surum.tar.xz
|
||||
bpo34056-always-return-bytes-from-_HackedGetData.get_data.patch
|
||||
dont-make-libpython-readonly.patch)
|
||||
|
||||
derle() {
|
||||
_pybasever=${surum%.*}
|
||||
cd Python-$surum
|
||||
|
||||
# https://bugs.python.org/issue34056
|
||||
patch -Np1 -i ../bpo34056-always-return-bytes-from-_HackedGetData.get_data.patch
|
||||
|
||||
# FS#45809
|
||||
patch -p1 -i ../dont-make-libpython-readonly.patch
|
||||
|
||||
# FS#23997
|
||||
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
|
||||
|
||||
# Ensure that we are using the system copy of various libraries (expat, libffi, and libmpdec),
|
||||
# rather than copies shipped in the tarball
|
||||
rm -r Modules/expat
|
||||
rm -r Modules/_ctypes/{darwin,libffi}*
|
||||
rm -r Modules/_decimal/libmpdec
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--enable-shared \
|
||||
--with-threads \
|
||||
--with-computed-gotos \
|
||||
--enable-optimizations \
|
||||
--with-lto \
|
||||
--enable-ipv6 \
|
||||
--with-system-expat \
|
||||
--with-dbmliborder=gdbm:ndbm \
|
||||
--with-system-ffi \
|
||||
--with-system-libmpdec \
|
||||
--enable-loadable-sqlite-extensions \
|
||||
--without-ensurepip
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
|
||||
chmod -v 755 $PKG/usr/lib/libpython3.5m.so
|
||||
chmod -v 755 $PKG//usr/lib/libpython3.so
|
||||
export servernum=99
|
||||
while ! xvfb-run -a -n "$servernum" /bin/true 2>/dev/null; do servernum=$((servernum+1)); done
|
||||
|
||||
# Install all HTML Docs files with desktop menu integration
|
||||
LC_CTYPE=en_US.UTF-8 xvfb-run -s "-screen 0 1280x720x24 -ac +extension GLX" -a -n "$servernum" make EXTRA_CFLAGS="$CFLAGS"
|
||||
|
||||
install -v -dm755 $PKG/usr/share/doc/$isim-$docversion/html
|
||||
cd $SRC
|
||||
wget --no-check-certificate -c https://www.python.org/ftp/python/doc/${docversion:0:5}/python-${docversion}-docs-html.tar.bz2
|
||||
tar --strip-components=1 \
|
||||
--no-same-owner \
|
||||
--no-same-permissions \
|
||||
-C $PKG/usr/share/doc/$isim-$docversion/html \
|
||||
-xvf python-$docversion-docs-html.tar.bz2
|
||||
sed -i 's/^all:.*$/all: build_all/' Makefile
|
||||
|
||||
find $PKG/usr/share/doc/$isim-$docversion -type d -exec chmod 0755 {} \;
|
||||
find $PKG/usr/share/doc/$isim-$docversion -type f -exec chmod 0644 {} \;
|
||||
make DESTDIR="${PKG}" EXTRA_CFLAGS="$CFLAGS" install
|
||||
|
||||
mkdir -p $PKG/usr/share/applications
|
||||
echo "[Desktop Entry]
|
||||
Categories=Development;Documentation
|
||||
Exec=xdg-open file:///usr/share/doc/python3-$docversion/html/index.html
|
||||
Icon=python3
|
||||
StartupNotify=false
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Name=Python 3 Documentation
|
||||
Name[fr]=Documentation Python 3" > $PKG/usr/share/applications/python3.desktop
|
||||
install -Dm644 $SRC/$isim.png \
|
||||
$PKG/usr/share/icons/hicolor/48x48/apps/$isim.png
|
||||
}
|
||||
doc () {
|
||||
cd $PKG
|
||||
bsdtar -cf \
|
||||
bsdtar -cf \
|
||||
$PKGMK_PACKAGE_DIR/$isim.doc#$surum-any.mps \
|
||||
usr/share/doc/$isim-$docversion \
|
||||
usr/share/applications/$isim.desktop \
|
||||
usr/share/icons/hicolor/48x48/apps/$isim.png
|
||||
install -dm755 "${PKG}"/usr/lib/python${_pybasever}/Tools/{i18n,scripts}
|
||||
install -m755 Tools/i18n/{msgfmt,pygettext}.py "${PKG}"/usr/lib/python${_pybasever}/Tools/i18n/
|
||||
install -m755 Tools/scripts/{README,*py} "${PKG}"/usr/lib/python${_pybasever}/Tools/scripts/
|
||||
|
||||
rm -r usr/share/{doc,applications/$isim.desktop,icons/hicolor/48x48/apps/$isim.png}
|
||||
# License
|
||||
install -Dm644 LICENSE "${PKG}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue