create core package
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
||||
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
import os
|
||||
|
||||
WorkDir = "Python-%s" % get.srcVERSION()
|
||||
|
||||
PythonVersion = "2.7"
|
||||
|
||||
def setup():
|
||||
pisitools.cflags.add("-fwrapv")
|
||||
|
||||
# no rpath
|
||||
pisitools.dosed("configure.ac", "-rpath \$\(LIBDIR\) ")
|
||||
|
||||
pisitools.dosed("Lib/cgi.py", r"/usr/local/bin/", r"/usr/bin/")
|
||||
pisitools.dosed("setup.py", "SQLITE_OMIT_LOAD_EXTENSION", deleteLine=True)
|
||||
pisitools.dosed("setup.py","ndbm_libs =.*","ndbm_libs = ['gdbm', 'gdbm_compat']")
|
||||
|
||||
for dir in ["expat","zlib","_ctypes/libffi_arm_wince","_ctypes/libffi_msvc",
|
||||
"_ctypes/libffi_osx","_ctypes/libffi","_ctypes/darwin"]:
|
||||
shelltools.unlinkDir("Modules/%s" % dir)
|
||||
|
||||
autotools.autoreconf("-vif")
|
||||
|
||||
# disable bsddb
|
||||
pisitools.dosed("setup.py", "^(disabled_module_list = \[)\]", r"\1'_bsddb', 'dbm']")
|
||||
# no rpath
|
||||
pisitools.dosed("Lib/distutils/command/build_ext.py", "self.rpath.append\(user_lib\)", "pass")
|
||||
|
||||
autotools.configure("--with-fpectl \
|
||||
--enable-shared \
|
||||
--enable-ipv6 \
|
||||
--with-threads \
|
||||
--with-libc='' \
|
||||
--enable-unicode=ucs4 \
|
||||
--with-wctype-functions \
|
||||
--with-system-expat \
|
||||
--with-system-ffi \
|
||||
--with-dbmliborder=gdbm \
|
||||
")
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
|
||||
# some tests fail. let's disable testing temporarily
|
||||
# def check():
|
||||
#autotools.make("test")
|
||||
|
||||
def install():
|
||||
autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "altinstall")
|
||||
|
||||
pisitools.dosym("/usr/bin/python%s" % PythonVersion, "/usr/bin/python")
|
||||
pisitools.dosym("/usr/bin/python%s-config" % PythonVersion, "/usr/bin/python-config")
|
||||
pisitools.dosym("/usr/lib/python%s/pdb.py" % PythonVersion, "/usr/bin/pdb")
|
||||
|
||||
pisitools.dodoc("LICENSE", "README")
|
||||
@@ -0,0 +1,39 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import piksemel
|
||||
import sys
|
||||
import os
|
||||
|
||||
pythonPath="/usr/lib/python%d.%d" % sys.version_info[:2]
|
||||
|
||||
def byteCompile(filepath):
|
||||
doc = piksemel.parse(filepath)
|
||||
paths = []
|
||||
for item in doc.tags("File"):
|
||||
path = item.getTagData("Path")
|
||||
if path.endswith(".py") and not path.startswith("usr/share/doc/"):
|
||||
paths.append("/"+path)
|
||||
|
||||
if paths:
|
||||
os.system("/usr/bin/python %s/py_compile.py %s" % (pythonPath, " ".join(paths)))
|
||||
|
||||
def removeByteCompiled(filepath):
|
||||
doc = piksemel.parse(filepath)
|
||||
for item in doc.tags("File"):
|
||||
path = item.getTagData("Path")
|
||||
if path.endswith(".py"):
|
||||
try:
|
||||
# Remove .pyc and .pyo
|
||||
os.unlink("/%sc" % path)
|
||||
os.unlink("/%so" % path)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def setupPackage(metapath, filepath):
|
||||
byteCompile(filepath)
|
||||
|
||||
def cleanupPackage(metapath, filepath):
|
||||
pass
|
||||
|
||||
def postCleanupPackage(metapath, filepath):
|
||||
removeByteCompiled(filepath)
|
||||
@@ -0,0 +1 @@
|
||||
PYTHONSTARTUP="/etc/pythonstart"
|
||||
@@ -0,0 +1,11 @@
|
||||
--- Lib/site.py.orig 2014-05-31 21:58:39.000000000 +0300
|
||||
+++ Lib/site.py 2014-06-03 01:06:08.958350806 +0300
|
||||
@@ -292,6 +292,8 @@
|
||||
"python" + sys.version[:3],
|
||||
"site-packages"))
|
||||
sitepackages.append(os.path.join(prefix, "lib", "site-python"))
|
||||
+ sitepackages.insert(0, os.path.join(prefix, "lib", "pisilinux"))
|
||||
+ sitepackages.insert(1, os.path.join(prefix, "lib", "pardus"))
|
||||
else:
|
||||
sitepackages.append(prefix)
|
||||
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
|
||||
@@ -0,0 +1,12 @@
|
||||
--- Lib/site.py 2005-10-17 15:38:18.000000000 +0300
|
||||
+++ Lib/site.py 2005-10-17 15:41:02.000000000 +0300
|
||||
@@ -349,7 +349,7 @@
|
||||
"""Set the string encoding used by the Unicode implementation. The
|
||||
default is 'ascii', but if you're willing to experiment, you can
|
||||
change this."""
|
||||
- encoding = "ascii" # Default value set by _PyUnicode_Init()
|
||||
+ encoding = "utf-8" # Default value set by _PyUnicode_Init()
|
||||
if 0:
|
||||
# Enable to support locale aware default string encodings.
|
||||
import locale
|
||||
Yalnızca Python-2.4.2/Lib'da: site.py~
|
||||
@@ -0,0 +1,11 @@
|
||||
--- Python-2.5/Lib/distutils/command/install.py.egginfo 2006-12-06 17:12:57.000000000 -0500
|
||||
+++ Python-2.5/Lib/distutils/command/install.py 2006-12-06 17:13:10.000000000 -0500
|
||||
@@ -601,7 +601,7 @@
|
||||
('install_headers', has_headers),
|
||||
('install_scripts', has_scripts),
|
||||
('install_data', has_data),
|
||||
- ('install_egg_info', lambda self:True),
|
||||
+ ('install_egg_info', lambda self:False),
|
||||
]
|
||||
|
||||
# class install
|
||||
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Exec=idle
|
||||
Icon=idle
|
||||
Name=IDLE Integrated Development Environment
|
||||
Name[tr]=IDLE Tümleşik Geliştirme Ortamı
|
||||
StartupNotify=false
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Application;Development;
|
||||
MimeType=application/x-python;
|
||||
@@ -0,0 +1,13 @@
|
||||
--- setup.py~ 2013-08-31 18:39:47.372964836 +0300
|
||||
+++ setup.py 2013-08-31 18:39:57.938964450 +0300
|
||||
@@ -437,8 +437,8 @@
|
||||
|
||||
def detect_modules(self):
|
||||
# Ensure that /usr/local is always used
|
||||
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
+# add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
+# add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
self.add_gcc_paths()
|
||||
self.add_multiarch_paths()
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
Index: Lib/platform.py
|
||||
===================================================================
|
||||
--- Lib/platform.py (revision 86735)
|
||||
+++ Lib/platform.py (working copy)
|
||||
@@ -259,7 +259,7 @@
|
||||
_supported_dists = (
|
||||
'SuSE', 'debian', 'fedora', 'redhat', 'centos',
|
||||
'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo',
|
||||
- 'UnitedLinux', 'turbolinux')
|
||||
+ 'UnitedLinux', 'turbolinux', 'pisilinux')
|
||||
|
||||
def _parse_release_file(firstline):
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1,29 @@
|
||||
# startup script for python to enable saving of interpreter history and
|
||||
# enabling name completion
|
||||
|
||||
# import needed modules
|
||||
import atexit
|
||||
import os
|
||||
import readline
|
||||
import rlcompleter
|
||||
|
||||
# where is history saved
|
||||
historyPath = os.path.expanduser("~/.pyhistory")
|
||||
|
||||
# handler for saving history
|
||||
def save_history(historyPath=historyPath):
|
||||
import readline
|
||||
readline.write_history_file(historyPath)
|
||||
|
||||
# read history, if it exists
|
||||
if os.path.exists(historyPath):
|
||||
readline.read_history_file(historyPath)
|
||||
|
||||
# register saving handler
|
||||
atexit.register(save_history)
|
||||
|
||||
# enable completion
|
||||
readline.parse_and_bind('tab: complete')
|
||||
|
||||
# cleanup
|
||||
del os, atexit, readline, rlcompleter, save_history, historyPath
|
||||
@@ -0,0 +1,24 @@
|
||||
diff -Nur Python-2.5.2-old/Lib/email/__init__.py Python-2.5.2/Lib/email/__init__.py
|
||||
--- Python-2.5.2-old/Lib/email/__init__.py 2008-07-02 18:58:15.000000000 +0300
|
||||
+++ Python-2.5.2/Lib/email/__init__.py 2008-07-02 18:59:28.000000000 +0300
|
||||
@@ -109,15 +109,18 @@
|
||||
'Text',
|
||||
]
|
||||
|
||||
+import string
|
||||
+lower_map = string.maketrans(string.ascii_uppercase, string.ascii_lowercase)
|
||||
+
|
||||
for _name in _LOWERNAMES:
|
||||
- importer = LazyImporter(_name.lower())
|
||||
+ importer = LazyImporter(_name.translate(lower_map))
|
||||
sys.modules['email.' + _name] = importer
|
||||
setattr(sys.modules['email'], _name, importer)
|
||||
|
||||
|
||||
import email.mime
|
||||
for _name in _MIMENAMES:
|
||||
- importer = LazyImporter('mime.' + _name.lower())
|
||||
+ importer = LazyImporter('mime.' + _name.translate(lower_map))
|
||||
sys.modules['email.MIME' + _name] = importer
|
||||
setattr(sys.modules['email'], 'MIME' + _name, importer)
|
||||
setattr(sys.modules['email.mime'], _name, importer)
|
||||
@@ -0,0 +1,214 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>python</Name>
|
||||
<Homepage>http://www.python.org/</Homepage>
|
||||
<Packager>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admins@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<License>PSF-2.2</License>
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>An interpreted, interactive, object-orientated programming language</Summary>
|
||||
<Description>Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days.</Description>
|
||||
<Archive sha1sum="3172f6e957713c2d9fca462cc16068222fd1b9d3" type="tarxz">http://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>bzip2</Dependency>
|
||||
<Dependency>tcl-devel</Dependency>
|
||||
<Dependency>gdbm-devel</Dependency>
|
||||
<Dependency>zlib-devel</Dependency>
|
||||
<Dependency>expat-devel</Dependency>
|
||||
<Dependency>tcltk-devel</Dependency>
|
||||
<Dependency>libffi-devel</Dependency>
|
||||
<Dependency>sqlite-devel</Dependency>
|
||||
<Dependency>ncurses-devel</Dependency>
|
||||
<Dependency>openssl-devel</Dependency>
|
||||
<Dependency>readline-devel</Dependency>
|
||||
<!-- Bootstrap -->
|
||||
<!-- Comment these deps when bootstrapping -->
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch>pisilinux_platform.patch</Patch>
|
||||
<!-- Look into /usr/lib/pisi-linux first -->
|
||||
<Patch>add-pisilinux-to-search-path.patch</Patch>
|
||||
<!-- Use UTF-8 by default -->
|
||||
<Patch>default-utf8.patch</Patch>
|
||||
<!-- Disable egginfo -->
|
||||
<Patch level="1">disable-egginfo.patch</Patch>
|
||||
<!-- some Turkish locale fixes, usually caused by tolower() -->
|
||||
<Patch level="1">trfix_emaillib.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>python</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>gdbm</Dependency>
|
||||
<Dependency>zlib</Dependency>
|
||||
<Dependency>bzip2</Dependency>
|
||||
<Dependency>expat</Dependency>
|
||||
<Dependency>libffi</Dependency>
|
||||
<Dependency>sqlite</Dependency>
|
||||
<Dependency>ncurses</Dependency>
|
||||
<Dependency>openssl</Dependency>
|
||||
<Dependency>readline</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="config">/etc</Path>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<!-- "Makefile" and the config-32/64.h file are needed by
|
||||
distutils/sysconfig.py:_init_posix(), so we include them in the core
|
||||
package, along with their parent directories (https://bugzilla.redhat.com/show_bug.cgi?id=531901)
|
||||
-->
|
||||
<Path fileType="header">/usr/include/python2.7/pyconfig.h</Path>
|
||||
<Path fileType="library">/usr/lib</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
<Path fileType="man">/usr/share/man</Path>
|
||||
</Files>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile owner="root" permission="0755" target="/etc/pythonstart">pythonstart</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/env.d/04python">04python</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
<Provides>
|
||||
<!--COMAR script="package.py">System.Package</COMAR-->
|
||||
<COMAR script="pakhandler.py">System.PackageHandler</COMAR>
|
||||
</Provides>
|
||||
<BuildFlags>
|
||||
<Flag>noDelta</Flag>
|
||||
</BuildFlags>
|
||||
</Package>
|
||||
|
||||
<Package>
|
||||
<Name>python-devel</Name>
|
||||
<PartOf>system.devel</PartOf>
|
||||
<Summary>Development files for python</Summary>
|
||||
<RuntimeDependencies>
|
||||
<Dependency release="current">python</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="header">/usr/include</Path>
|
||||
<Path fileType="data">/usr/lib/pkgconfig</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<!-- Comment these packages (python-tk and idle) when bootstrapping -->
|
||||
<Package>
|
||||
<Name>python-tk</Name>
|
||||
<IsA>library</IsA>
|
||||
<PartOf>programming.language.python</PartOf>
|
||||
<Summary>Python modules for Tk</Summary>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>tcl</Dependency>
|
||||
<Dependency>tcltk</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="library">/usr/lib/python*/lib-tk</Path>
|
||||
<Path fileType="library">/usr/lib/python*/lib-dynload/_tkinter.so</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<!-- Comment these packages (python-tk and idle) when bootstrapping -->
|
||||
<Package>
|
||||
<Name>idle</Name>
|
||||
<Icon>idle</Icon>
|
||||
<IsA>app:gui</IsA>
|
||||
<PartOf>programming.environment</PartOf>
|
||||
<Summary>An Integrated Development Environment for Python</Summary>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>python-tk</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/bin/idle</Path>
|
||||
<Path fileType="library">/usr/lib/python*/idlelib</Path>
|
||||
<Path fileType="data">/usr/share/applications</Path>
|
||||
<Path fileType="data">/usr/share/pixmaps</Path>
|
||||
</Files>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile permission="0644" target="/usr/share/pixmaps/idle.png">python-logo.png</AdditionalFile>
|
||||
<AdditionalFile permission="0644" target="/usr/share/applications/idle.desktop">idle.desktop</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="11">
|
||||
<Date>2014-12-12</Date>
|
||||
<Version>2.7.9</Version>
|
||||
<Comment>Version bump and security fixes.</Comment>
|
||||
<Name>Vedat Demir</Name>
|
||||
<Email>vedat@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="10">
|
||||
<Date>2014-07-05</Date>
|
||||
<Version>2.7.8</Version>
|
||||
<Comment>Version bump and security fixes.</Comment>
|
||||
<Name>Vedat Demir</Name>
|
||||
<Email>vedat@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="9">
|
||||
<Date>2014-06-02</Date>
|
||||
<Version>2.7.7</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Marcin Bojara</Name>
|
||||
<Email>marcin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="8">
|
||||
<Date>2014-05-11</Date>
|
||||
<Version>2.7.6</Version>
|
||||
<Comment>Release bump.</Comment>
|
||||
<Name>Marcin Bojara</Name>
|
||||
<Email>marcin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="7">
|
||||
<Date>2014-04-25</Date>
|
||||
<Version>2.7.6</Version>
|
||||
<Comment>Add upstream patch.</Comment>
|
||||
<Name>Marcin Bojara</Name>
|
||||
<Email>marcin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="6">
|
||||
<Date>2014-02-20</Date>
|
||||
<Version>2.7.6</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Yusuf Aydemir</Name>
|
||||
<Email>yusuf.aydemir@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="5">
|
||||
<Date>2013-09-05</Date>
|
||||
<Version>2.7.5</Version>
|
||||
<Comment>Add missing method to pakhandler.py</Comment>
|
||||
<Name>Marcin Bojara</Name>
|
||||
<Email>marcin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="4">
|
||||
<Date>2013-08-31</Date>
|
||||
<Version>2.7.5</Version>
|
||||
<Comment>Clean python.</Comment>
|
||||
<Name>Marcin Bojara</Name>
|
||||
<Email>marcin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="3">
|
||||
<Date>2013-08-21</Date>
|
||||
<Version>2.7.5</Version>
|
||||
<Comment>Add some patches.</Comment>
|
||||
<Name>Marcin Bojara</Name>
|
||||
<Email>marcin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="2">
|
||||
<Date>2013-07-16</Date>
|
||||
<Version>2.7.5</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Marcin Bojara</Name>
|
||||
<Email>marcin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="1" type="security">
|
||||
<Date>2012-07-11</Date>
|
||||
<Version>2.7.3</Version>
|
||||
<Comment>First release</Comment>
|
||||
<Name>Erdem Artan</Name>
|
||||
<Email>admins@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" ?>
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>python</Name>
|
||||
<Summary xml:lang="tr">Nesneye yönelik bir programlama dili</Summary>
|
||||
<Description xml:lang="tr">Python, yazılım geliştirmenin birçok aşamasında kullanılabilen, dinamik nesne tabanlı bir programlama dilidir. Diğer programlama dilleriyle bütünleşme için sağlam bir destek sunar, kapsamlı standart kütüphanelerle sunulur ve birkaç günde öğrenilebilir.</Description>
|
||||
<Description xml:lang="fr">Python est un langage de programmation dynamique orienté objet pouvant être utilisé pour différents types de développements logiciels. Il offre une intégration renforcée aussi bien avec les autres langages qu'avec des outils. Il est livré avec des librairies standards couvrant un large périmètre et peut être appris en quelques jours.</Description>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>python-devel</Name>
|
||||
<Summary xml:lang="tr">python için geliştirme dosyaları</Summary>
|
||||
</Package>
|
||||
|
||||
<Package>
|
||||
<Name>python-tk</Name>
|
||||
<Summary xml:lang="tr">Tk için Python modülleri</Summary>
|
||||
</Package>
|
||||
|
||||
<Package>
|
||||
<Name>idle</Name>
|
||||
<Summary xml:lang="tr">Python için Tümleşik Geliştirme Ortamı</Summary>
|
||||
</Package>
|
||||
|
||||
</PISI>
|
||||
Reference in New Issue
Block a user