Add Python-2.0.1
This commit is contained in:
parent
0b7cd62f73
commit
13eaba86e8
|
@ -0,0 +1,193 @@
|
||||||
|
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
|
||||||
|
--------------------------------------------
|
||||||
|
|
||||||
|
1. This LICENSE AGREEMENT is between the Python Software Foundation
|
||||||
|
("PSF"), and the Individual or Organization ("Licensee") accessing and
|
||||||
|
otherwise using this software ("Python") in source or binary form and
|
||||||
|
its associated documentation.
|
||||||
|
|
||||||
|
2. Subject to the terms and conditions of this License Agreement, PSF hereby
|
||||||
|
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
|
||||||
|
analyze, test, perform and/or display publicly, prepare derivative works,
|
||||||
|
distribute, and otherwise use Python alone or in any derivative version,
|
||||||
|
provided, however, that PSF's License Agreement and PSF's notice of copyright,
|
||||||
|
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
|
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Python Software Foundation;
|
||||||
|
All Rights Reserved" are retained in Python alone or in any derivative version
|
||||||
|
prepared by Licensee.
|
||||||
|
|
||||||
|
3. In the event Licensee prepares a derivative work that is based on
|
||||||
|
or incorporates Python or any part thereof, and wants to make
|
||||||
|
the derivative work available to others as provided herein, then
|
||||||
|
Licensee hereby agrees to include in any such work a brief summary of
|
||||||
|
the changes made to Python.
|
||||||
|
|
||||||
|
4. PSF is making Python available to Licensee on an "AS IS"
|
||||||
|
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||||
|
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
||||||
|
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||||
|
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
|
||||||
|
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||||
|
|
||||||
|
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
||||||
|
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
||||||
|
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
|
||||||
|
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||||
|
|
||||||
|
6. This License Agreement will automatically terminate upon a material
|
||||||
|
breach of its terms and conditions.
|
||||||
|
|
||||||
|
7. Nothing in this License Agreement shall be deemed to create any
|
||||||
|
relationship of agency, partnership, or joint venture between PSF and
|
||||||
|
Licensee. This License Agreement does not grant permission to use PSF
|
||||||
|
trademarks or trade name in a trademark sense to endorse or promote
|
||||||
|
products or services of Licensee, or any third party.
|
||||||
|
|
||||||
|
8. By copying, installing or otherwise using Python, Licensee
|
||||||
|
agrees to be bound by the terms and conditions of this License
|
||||||
|
Agreement.
|
||||||
|
|
||||||
|
|
||||||
|
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
|
||||||
|
|
||||||
|
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
|
||||||
|
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
|
||||||
|
Individual or Organization ("Licensee") accessing and otherwise using
|
||||||
|
this software in source or binary form and its associated
|
||||||
|
documentation ("the Software").
|
||||||
|
|
||||||
|
2. Subject to the terms and conditions of this BeOpen Python License
|
||||||
|
Agreement, BeOpen hereby grants Licensee a non-exclusive,
|
||||||
|
royalty-free, world-wide license to reproduce, analyze, test, perform
|
||||||
|
and/or display publicly, prepare derivative works, distribute, and
|
||||||
|
otherwise use the Software alone or in any derivative version,
|
||||||
|
provided, however, that the BeOpen Python License is retained in the
|
||||||
|
Software, alone or in any derivative version prepared by Licensee.
|
||||||
|
|
||||||
|
3. BeOpen is making the Software available to Licensee on an "AS IS"
|
||||||
|
basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||||
|
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
|
||||||
|
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||||
|
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
|
||||||
|
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||||
|
|
||||||
|
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
|
||||||
|
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
|
||||||
|
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
|
||||||
|
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||||
|
|
||||||
|
5. This License Agreement will automatically terminate upon a material
|
||||||
|
breach of its terms and conditions.
|
||||||
|
|
||||||
|
6. This License Agreement shall be governed by and interpreted in all
|
||||||
|
respects by the law of the State of California, excluding conflict of
|
||||||
|
law provisions. Nothing in this License Agreement shall be deemed to
|
||||||
|
create any relationship of agency, partnership, or joint venture
|
||||||
|
between BeOpen and Licensee. This License Agreement does not grant
|
||||||
|
permission to use BeOpen trademarks or trade names in a trademark
|
||||||
|
sense to endorse or promote products or services of Licensee, or any
|
||||||
|
third party. As an exception, the "BeOpen Python" logos available at
|
||||||
|
http://www.pythonlabs.com/logos.html may be used according to the
|
||||||
|
permissions granted on that web page.
|
||||||
|
|
||||||
|
7. By copying, installing or otherwise using the software, Licensee
|
||||||
|
agrees to be bound by the terms and conditions of this License
|
||||||
|
Agreement.
|
||||||
|
|
||||||
|
|
||||||
|
CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
1. This LICENSE AGREEMENT is between the Corporation for National
|
||||||
|
Research Initiatives, having an office at 1895 Preston White Drive,
|
||||||
|
Reston, VA 20191 ("CNRI"), and the Individual or Organization
|
||||||
|
("Licensee") accessing and otherwise using Python 1.6.1 software in
|
||||||
|
source or binary form and its associated documentation.
|
||||||
|
|
||||||
|
2. Subject to the terms and conditions of this License Agreement, CNRI
|
||||||
|
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
||||||
|
license to reproduce, analyze, test, perform and/or display publicly,
|
||||||
|
prepare derivative works, distribute, and otherwise use Python 1.6.1
|
||||||
|
alone or in any derivative version, provided, however, that CNRI's
|
||||||
|
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
|
||||||
|
1995-2001 Corporation for National Research Initiatives; All Rights
|
||||||
|
Reserved" are retained in Python 1.6.1 alone or in any derivative
|
||||||
|
version prepared by Licensee. Alternately, in lieu of CNRI's License
|
||||||
|
Agreement, Licensee may substitute the following text (omitting the
|
||||||
|
quotes): "Python 1.6.1 is made available subject to the terms and
|
||||||
|
conditions in CNRI's License Agreement. This Agreement together with
|
||||||
|
Python 1.6.1 may be located on the internet using the following
|
||||||
|
unique, persistent identifier (known as a handle): 1895.22/1013. This
|
||||||
|
Agreement may also be obtained from a proxy server on the internet
|
||||||
|
using the following URL: http://hdl.handle.net/1895.22/1013".
|
||||||
|
|
||||||
|
3. In the event Licensee prepares a derivative work that is based on
|
||||||
|
or incorporates Python 1.6.1 or any part thereof, and wants to make
|
||||||
|
the derivative work available to others as provided herein, then
|
||||||
|
Licensee hereby agrees to include in any such work a brief summary of
|
||||||
|
the changes made to Python 1.6.1.
|
||||||
|
|
||||||
|
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
|
||||||
|
basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||||
|
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
|
||||||
|
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||||
|
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
|
||||||
|
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||||
|
|
||||||
|
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
||||||
|
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
||||||
|
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
|
||||||
|
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||||
|
|
||||||
|
6. This License Agreement will automatically terminate upon a material
|
||||||
|
breach of its terms and conditions.
|
||||||
|
|
||||||
|
7. This License Agreement shall be governed by the federal
|
||||||
|
intellectual property law of the United States, including without
|
||||||
|
limitation the federal copyright law, and, to the extent such
|
||||||
|
U.S. federal law does not apply, by the law of the Commonwealth of
|
||||||
|
Virginia, excluding Virginia's conflict of law provisions.
|
||||||
|
Notwithstanding the foregoing, with regard to derivative works based
|
||||||
|
on Python 1.6.1 that incorporate non-separable material that was
|
||||||
|
previously distributed under the GNU General Public License (GPL), the
|
||||||
|
law of the Commonwealth of Virginia shall govern this License
|
||||||
|
Agreement only as to issues arising under or with respect to
|
||||||
|
Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
|
||||||
|
License Agreement shall be deemed to create any relationship of
|
||||||
|
agency, partnership, or joint venture between CNRI and Licensee. This
|
||||||
|
License Agreement does not grant permission to use CNRI trademarks or
|
||||||
|
trade name in a trademark sense to endorse or promote products or
|
||||||
|
services of Licensee, or any third party.
|
||||||
|
|
||||||
|
8. By clicking on the "ACCEPT" button where indicated, or by copying,
|
||||||
|
installing or otherwise using Python 1.6.1, Licensee agrees to be
|
||||||
|
bound by the terms and conditions of this License Agreement.
|
||||||
|
|
||||||
|
ACCEPT
|
||||||
|
|
||||||
|
|
||||||
|
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
|
||||||
|
--------------------------------------------------
|
||||||
|
|
||||||
|
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
|
||||||
|
The Netherlands. All rights reserved.
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and distribute this software and its
|
||||||
|
documentation for any purpose and without fee is hereby granted,
|
||||||
|
provided that the above copyright notice appear in all copies and that
|
||||||
|
both that copyright notice and this permission notice appear in
|
||||||
|
supporting documentation, and that the name of Stichting Mathematisch
|
||||||
|
Centrum or CWI not be used in advertising or publicity pertaining to
|
||||||
|
distribution of the software without specific, written prior
|
||||||
|
permission.
|
||||||
|
|
||||||
|
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
||||||
|
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
|
||||||
|
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||||
|
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@ -1,3 +1,5 @@
|
||||||
|
dd761c6ab360b9ae66816b10fae38c3d547a146028188083295130f25dd03f5d Python-2.0.1_0.tar.bz2
|
||||||
|
d64800e5da112f1cbdc3d2799ebd264d07fe8f111dd41edc37ed2276b3acda41 Python-2.0.1_1.tar.bz2
|
||||||
2fde9f584a275efc5c8bf23adaa690e06ab6922ecbc35108731e87f565ddb2b6 autoconf-2.12_0.tar.bz2
|
2fde9f584a275efc5c8bf23adaa690e06ab6922ecbc35108731e87f565ddb2b6 autoconf-2.12_0.tar.bz2
|
||||||
40d88d4b1048ab70eaecf753fb77713dfcaa9c9c72252cd36459236034cdcdfd autoconf-2.13_0.tar.bz2
|
40d88d4b1048ab70eaecf753fb77713dfcaa9c9c72252cd36459236034cdcdfd autoconf-2.13_0.tar.bz2
|
||||||
38f0de4c816088c514dbfb1536779f2204426a95bd6f57fa87b83bffefcaa390 autoconf-2.52_0.tar.bz2
|
38f0de4c816088c514dbfb1536779f2204426a95bd6f57fa87b83bffefcaa390 autoconf-2.52_0.tar.bz2
|
||||||
|
|
|
@ -0,0 +1,107 @@
|
||||||
|
SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: Python-2.0.1
|
||||||
|
|
||||||
|
unicodetype_db.h is a file that needs to be regened, but it not
|
||||||
|
particularly trivial to regen. For the first build of Python,
|
||||||
|
strip out any kind of unicode support that requires
|
||||||
|
unicodetype_db.h indiscriminately.
|
||||||
|
|
||||||
|
We are effectively restricted to ASCII characters with this change,
|
||||||
|
but it works.
|
||||||
|
|
||||||
|
--- Objects/unicodectype.c 2000-09-26 08:48:13.000000000 +1100
|
||||||
|
+++ Objects/unicodectype.c 2022-10-03 21:09:02.108869321 +1100
|
||||||
|
@@ -29,30 +29,12 @@
|
||||||
|
const unsigned char digit;
|
||||||
|
} _PyUnicode_TypeRecord;
|
||||||
|
|
||||||
|
-#include "unicodetype_db.h"
|
||||||
|
-
|
||||||
|
-static const _PyUnicode_TypeRecord *
|
||||||
|
-gettyperecord(int code)
|
||||||
|
-{
|
||||||
|
- int index;
|
||||||
|
-
|
||||||
|
- if (code < 0 || code >= 65536)
|
||||||
|
- index = 0;
|
||||||
|
- else {
|
||||||
|
- index = index1[(code>>SHIFT)];
|
||||||
|
- index = index2[(index<<SHIFT)+(code&((1<<SHIFT)-1))];
|
||||||
|
- }
|
||||||
|
- return &_PyUnicode_TypeRecords[index];
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
/* Returns 1 for Unicode characters having the category 'Zl' or type
|
||||||
|
'B', 0 otherwise. */
|
||||||
|
|
||||||
|
int _PyUnicode_IsLinebreak(register const Py_UNICODE ch)
|
||||||
|
{
|
||||||
|
- const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||||
|
-
|
||||||
|
- return (ctype->flags & LINEBREAK_MASK) != 0;
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Returns the titlecase Unicode characters corresponding to ch or just
|
||||||
|
@@ -60,12 +44,7 @@
|
||||||
|
|
||||||
|
Py_UNICODE _PyUnicode_ToTitlecase(register const Py_UNICODE ch)
|
||||||
|
{
|
||||||
|
- const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||||
|
-
|
||||||
|
- if (ctype->title)
|
||||||
|
- return ch + ctype->title;
|
||||||
|
-
|
||||||
|
- return ch + ctype->upper;
|
||||||
|
+ return ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Returns 1 for Unicode characters having the category 'Lt', 0
|
||||||
|
@@ -73,9 +52,7 @@
|
||||||
|
|
||||||
|
int _PyUnicode_IsTitlecase(register const Py_UNICODE ch)
|
||||||
|
{
|
||||||
|
- const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||||
|
-
|
||||||
|
- return (ctype->flags & TITLE_MASK) != 0;
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Returns the integer decimal (0-9) for Unicode characters having
|
||||||
|
@@ -83,15 +60,13 @@
|
||||||
|
|
||||||
|
int _PyUnicode_ToDecimalDigit(register const Py_UNICODE ch)
|
||||||
|
{
|
||||||
|
- const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||||
|
-
|
||||||
|
- return (ctype->flags & DECIMAL_MASK) ? ctype->decimal : -1;
|
||||||
|
+ return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _PyUnicode_IsDecimalDigit(register const Py_UNICODE ch)
|
||||||
|
{
|
||||||
|
if (_PyUnicode_ToDecimalDigit(ch) < 0)
|
||||||
|
- return 0;
|
||||||
|
+ return 0;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -100,15 +75,13 @@
|
||||||
|
|
||||||
|
int _PyUnicode_ToDigit(register const Py_UNICODE ch)
|
||||||
|
{
|
||||||
|
- const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||||
|
-
|
||||||
|
- return (ctype->flags & DIGIT_MASK) ? ctype->digit : -1;
|
||||||
|
+ return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _PyUnicode_IsDigit(register const Py_UNICODE ch)
|
||||||
|
{
|
||||||
|
if (_PyUnicode_ToDigit(ch) < 0)
|
||||||
|
- return 0;
|
||||||
|
+ return 0;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Python-2.0.1
|
||||||
|
*
|
||||||
|
* Reimplmentation of keyword.py main() in C, to break bootstrapping loop
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#define MAX_LINE 128
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
char filename[] = "Lib/keyword.py";
|
||||||
|
FILE *orig = fopen(filename, "r");
|
||||||
|
/* Read-write until starter line */
|
||||||
|
char *line = malloc(MAX_LINE);
|
||||||
|
do {
|
||||||
|
fgets(line, MAX_LINE, orig);
|
||||||
|
puts(line);
|
||||||
|
} while (strcmp(line, "#--start keywords--\n") != 0);
|
||||||
|
/* Perform the actual transformation */
|
||||||
|
while (fgets(line, MAX_LINE, stdin) != NULL) {
|
||||||
|
char *token = line;
|
||||||
|
while (*token != '"') token++;
|
||||||
|
token++;
|
||||||
|
/* Now at beginning of keyword */
|
||||||
|
char *end = token;
|
||||||
|
while (*end != '"') end++;
|
||||||
|
*end = '\0';
|
||||||
|
/* Write output line to stdout */
|
||||||
|
printf("'%s',\n", token);
|
||||||
|
/* For each line also advance orig pointer */
|
||||||
|
fgets(line, MAX_LINE, orig);
|
||||||
|
/* Cleanup */
|
||||||
|
free(line);
|
||||||
|
line = malloc(MAX_LINE);
|
||||||
|
}
|
||||||
|
/* Read-write until end */
|
||||||
|
while (fgets(line, MAX_LINE, orig) != NULL) {
|
||||||
|
puts(line);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Python-2.0.1
|
||||||
|
*
|
||||||
|
* Reimplmentation of token.py main() in C, to break bootstrapping loop
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#define MAX_LINE 128
|
||||||
|
|
||||||
|
int main(int argc, char** argv) {
|
||||||
|
char *filename = argv[1];
|
||||||
|
FILE *orig = fopen(filename, "r");
|
||||||
|
/* Read-write until starter line */
|
||||||
|
char *line = malloc(MAX_LINE);
|
||||||
|
do {
|
||||||
|
fgets(line, MAX_LINE, orig);
|
||||||
|
puts(line);
|
||||||
|
} while (strcmp(line, "#--start constants--\n") != 0);
|
||||||
|
/* Perform the actual transformation */
|
||||||
|
while (fgets(line, MAX_LINE, stdin) != NULL) {
|
||||||
|
/* Transform input into output */
|
||||||
|
char *tokena = line + 8;
|
||||||
|
char *tokenb = strstr(tokena, "\t");
|
||||||
|
if (tokenb == 0) tokenb = strstr(tokena, " ");
|
||||||
|
*tokenb = '\0';
|
||||||
|
tokenb++;
|
||||||
|
while (*tokenb == '\t' || *tokenb == ' ') tokenb++;
|
||||||
|
/* Write output line to stdout */
|
||||||
|
printf("%s = %s", tokena, tokenb);
|
||||||
|
/* For each line also advance orig pointer */
|
||||||
|
fgets(line, MAX_LINE, orig);
|
||||||
|
/* Cleanup */
|
||||||
|
free(line);
|
||||||
|
line = malloc(MAX_LINE);
|
||||||
|
}
|
||||||
|
/* Read-write until end */
|
||||||
|
while (fgets(line, MAX_LINE, orig) != NULL) {
|
||||||
|
puts(line);
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,206 @@
|
||||||
|
SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: Python-2.0.1
|
||||||
|
|
||||||
|
Python 2.0 does not support DESTDIR, so add it in.
|
||||||
|
|
||||||
|
--- Makefile.in 2022-10-21 17:56:48.034287578 +1100
|
||||||
|
+++ Makefile.in 2022-10-21 18:07:54.267542882 +1100
|
||||||
|
@@ -224,16 +224,16 @@
|
||||||
|
|
||||||
|
# Install the interpreter (by creating a hard link to python$(VERSION))
|
||||||
|
bininstall: altbininstall
|
||||||
|
- -if test -f $(BINDIR)/python$(EXE); \
|
||||||
|
- then rm -f $(BINDIR)/python$(EXE); \
|
||||||
|
+ -if test -f $(DESTDIR)$(BINDIR)/python$(EXE); \
|
||||||
|
+ then rm -f $(DESTDIR)$(BINDIR)/python$(EXE); \
|
||||||
|
else true; \
|
||||||
|
fi
|
||||||
|
- (cd $(BINDIR); $(LN) python$(VERSION)$(EXE) python$(EXE))
|
||||||
|
+ (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) python$(EXE))
|
||||||
|
|
||||||
|
# Install the interpreter with $(VERSION) affixed
|
||||||
|
# This goes into $(exec_prefix)
|
||||||
|
altbininstall: python$(EXE)
|
||||||
|
- @for i in $(BINDIR); \
|
||||||
|
+ @for i in $(DESTDIR)$(BINDIR); \
|
||||||
|
do \
|
||||||
|
if test ! -d $$i; then \
|
||||||
|
echo "Creating directory $$i"; \
|
||||||
|
@@ -242,15 +242,15 @@
|
||||||
|
else true; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
- $(INSTALL_PROGRAM) python$(EXE) $(BINDIR)/python$(VERSION)$(EXE)
|
||||||
|
+ $(INSTALL_PROGRAM) python$(EXE) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
|
||||||
|
if test -f libpython$(VERSION).so; then \
|
||||||
|
- $(INSTALL_DATA) libpython$(VERSION).so $(LIBDIR); \
|
||||||
|
+ $(INSTALL_DATA) libpython$(VERSION).so $(DESTDIR)$(LIBDIR); \
|
||||||
|
else true; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install the manual page
|
||||||
|
maninstall:
|
||||||
|
- @for i in $(MANDIR) $(MANDIR)/man1; \
|
||||||
|
+ @for i in $(DESTDIR)$(MANDIR) $(DESTDIR)$(MANDIR)/man1; \
|
||||||
|
do \
|
||||||
|
if test ! -d $$i; then \
|
||||||
|
echo "Creating directory $$i"; \
|
||||||
|
@@ -260,7 +260,7 @@
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
$(INSTALL_DATA) $(srcdir)/Misc/python.man \
|
||||||
|
- $(MANDIR)/man1/python.1
|
||||||
|
+ $(DESTDIR)$(MANDIR)/man1/python.1
|
||||||
|
|
||||||
|
# Install the library
|
||||||
|
PLATDIR= plat-$(MACHDEP)
|
||||||
|
@@ -269,7 +269,7 @@
|
||||||
|
LIBSUBDIRS= lib-old lib-tk site-packages test test/output encodings \
|
||||||
|
distutils distutils/command $(XMLLIBSUBDIRS) curses $(MACHDEPS)
|
||||||
|
libinstall: python $(srcdir)/Lib/$(PLATDIR)
|
||||||
|
- @for i in $(SCRIPTDIR) $(LIBDEST); \
|
||||||
|
+ @for i in $(DESTDIR)$(SCRIPTDIR) $(DESTDIR)$(LIBDEST); \
|
||||||
|
do \
|
||||||
|
if test ! -d $$i; then \
|
||||||
|
echo "Creating directory $$i"; \
|
||||||
|
@@ -278,11 +278,11 @@
|
||||||
|
else true; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
- @for d in $(LIBSUBDIRS); \
|
||||||
|
+ @for d in $(DESTDIR)$(LIBSUBDIRS); \
|
||||||
|
do \
|
||||||
|
a=$(srcdir)/Lib/$$d; \
|
||||||
|
if test ! -d $$a; then continue; else true; fi; \
|
||||||
|
- b=$(LIBDEST)/$$d; \
|
||||||
|
+ b=$(DESTDIR)$(LIBDEST)/$$d; \
|
||||||
|
if test ! -d $$b; then \
|
||||||
|
echo "Creating directory $$b"; \
|
||||||
|
mkdir $$b; \
|
||||||
|
@@ -293,18 +293,18 @@
|
||||||
|
@for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc; \
|
||||||
|
do \
|
||||||
|
if test -x $$i; then \
|
||||||
|
- $(INSTALL_PROGRAM) $$i $(LIBDEST); \
|
||||||
|
- echo $(INSTALL_PROGRAM) $$i $(LIBDEST); \
|
||||||
|
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(LIBDEST); \
|
||||||
|
+ echo $(INSTALL_PROGRAM) $$i $(DESTDIR)$(LIBDEST); \
|
||||||
|
else \
|
||||||
|
- $(INSTALL_DATA) $$i $(LIBDEST); \
|
||||||
|
- echo $(INSTALL_DATA) $$i $(LIBDEST); \
|
||||||
|
+ $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
|
||||||
|
+ echo $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@for d in $(LIBSUBDIRS); \
|
||||||
|
do \
|
||||||
|
a=$(srcdir)/Lib/$$d; \
|
||||||
|
if test ! -d $$a; then continue; else true; fi; \
|
||||||
|
- b=$(LIBDEST)/$$d; \
|
||||||
|
+ b=$(DESTDIR)$(LIBDEST)/$$d; \
|
||||||
|
for i in $$a/*; \
|
||||||
|
do \
|
||||||
|
case $$i in \
|
||||||
|
@@ -324,11 +324,11 @@
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
done
|
||||||
|
- $(INSTALL_DATA) $(srcdir)/LICENSE $(LIBDEST)/LICENSE.txt
|
||||||
|
- PYTHONPATH=$(LIBDEST) \
|
||||||
|
- ./python$(EXE) -tt $(LIBDEST)/compileall.py $(LIBDEST)
|
||||||
|
- PYTHONPATH=$(LIBDEST) \
|
||||||
|
- ./python$(EXE) -O $(LIBDEST)/compileall.py $(LIBDEST)
|
||||||
|
+ $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
|
||||||
|
+ PYTHONPATH=$(DESTDIR)$(LIBDEST) \
|
||||||
|
+ ./python$(EXE) -tt $(DESTDIR)$(LIBDEST)/compileall.py $(DESTDIR)$(LIBDEST)
|
||||||
|
+ PYTHONPATH=$(DESTDIR)$(LIBDEST) \
|
||||||
|
+ ./python$(EXE) -O $(DESTDIR)$(LIBDEST)/compileall.py $(DESTDIR)$(LIBDEST)
|
||||||
|
|
||||||
|
# Create the PLATDIR source directory, if one wasn't distributed..
|
||||||
|
$(srcdir)/Lib/$(PLATDIR):
|
||||||
|
@@ -344,25 +344,25 @@
|
||||||
|
inclinstall:
|
||||||
|
@for i in $(INCLDIRSTOMAKE); \
|
||||||
|
do \
|
||||||
|
- if test ! -d $$i; then \
|
||||||
|
- echo "Creating directory $$i"; \
|
||||||
|
- mkdir $$i; \
|
||||||
|
- chmod $(DIRMODE) $$i; \
|
||||||
|
+ if test ! -d $(DESTDIR)$$i; then \
|
||||||
|
+ echo "Creating directory $(DESTDIR)$$i"; \
|
||||||
|
+ mkdir $(DESTDIR)$$i; \
|
||||||
|
+ chmod $(DIRMODE) $(DESTDIR)$$i; \
|
||||||
|
else true; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@for i in $(srcdir)/Include/*.h; \
|
||||||
|
do \
|
||||||
|
- echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
|
||||||
|
- $(INSTALL_DATA) $$i $(INCLUDEPY); \
|
||||||
|
+ echo $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
|
||||||
|
+ $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
|
||||||
|
done
|
||||||
|
- $(INSTALL_DATA) config.h $(CONFINCLUDEPY)/config.h
|
||||||
|
+ $(INSTALL_DATA) config.h $(DESTDIR)$(CONFINCLUDEPY)/config.h
|
||||||
|
|
||||||
|
# Install the library and miscellaneous stuff needed for extending/embedding
|
||||||
|
# This goes into $(exec_prefix)
|
||||||
|
LIBPL= $(LIBP)/config
|
||||||
|
libainstall: all
|
||||||
|
- @for i in $(LIBDIR) $(LIBP) $(LIBPL); \
|
||||||
|
+ @for i in $(DESTDIR)$(LIBDIR) $(DESTDIR)$(LIBP) $(DESTDIR)$(LIBPL); \
|
||||||
|
do \
|
||||||
|
if test ! -d $$i; then \
|
||||||
|
echo "Creating directory $$i"; \
|
||||||
|
@@ -372,19 +372,19 @@
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@if test -d $(LIBRARY); then :; else \
|
||||||
|
- $(INSTALL_DATA) $(LIBRARY) $(LIBPL)/$(LIBRARY) ; \
|
||||||
|
- $(RANLIB) $(LIBPL)/$(LIBRARY) ; \
|
||||||
|
+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
|
||||||
|
+ $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
|
||||||
|
fi
|
||||||
|
- $(INSTALL_DATA) Modules/config.c $(LIBPL)/config.c
|
||||||
|
- $(INSTALL_DATA) Modules/python.o $(LIBPL)/python.o
|
||||||
|
- $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(LIBPL)/config.c.in
|
||||||
|
- $(INSTALL_DATA) Modules/Makefile $(LIBPL)/Makefile
|
||||||
|
- $(INSTALL_DATA) Modules/Setup $(LIBPL)/Setup
|
||||||
|
- $(INSTALL_DATA) Modules/Setup.local $(LIBPL)/Setup.local
|
||||||
|
- $(INSTALL_DATA) Modules/Setup.config $(LIBPL)/Setup.config
|
||||||
|
- $(INSTALL_PROGRAM) $(srcdir)/Modules/makesetup $(LIBPL)/makesetup
|
||||||
|
- $(INSTALL_PROGRAM) $(srcdir)/install-sh $(LIBPL)/install-sh
|
||||||
|
- $(INSTALL_DATA) $(srcdir)/Misc/Makefile.pre.in $(LIBPL)/Makefile.pre.in
|
||||||
|
+ $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
|
||||||
|
+ $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
|
||||||
|
+ $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
|
||||||
|
+ $(INSTALL_DATA) Modules/Makefile $(DESTDIR)$(LIBPL)/Makefile
|
||||||
|
+ $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
|
||||||
|
+ $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
|
||||||
|
+ $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
|
||||||
|
+ $(INSTALL_PROGRAM) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
|
||||||
|
+ $(INSTALL_PROGRAM) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
|
||||||
|
+ $(INSTALL_DATA) $(srcdir)/Misc/Makefile.pre.in $(DESTDIR)$(LIBPL)/Makefile.pre.in
|
||||||
|
@if [ -s Modules/python.exp -a \
|
||||||
|
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
|
||||||
|
echo; echo "Installing support files for building shared extension modules on AIX:"; \
|
||||||
|
@@ -425,6 +425,7 @@
|
||||||
|
CCSHARED="$(CCSHARED)" \
|
||||||
|
LINKFORSHARED="$(LINKFORSHARED)" \
|
||||||
|
DESTSHARED="$(DESTSHARED)" \
|
||||||
|
+ DESTDIR="$(DESTDIR)" \
|
||||||
|
prefix="$(prefix)" \
|
||||||
|
exec_prefix="$(exec_prefix)" \
|
||||||
|
sharedinstall
|
||||||
|
--- Modules/Makefile.pre.in 2022-10-21 17:56:44.635251486 +1100
|
||||||
|
+++ Modules/Makefile.pre.in 2022-10-21 17:57:00.124415957 +1100
|
||||||
|
@@ -240,7 +240,7 @@
|
||||||
|
sharedinstall: $(DESTSHARED) $(SHAREDMODS)
|
||||||
|
-for i in X $(SHAREDMODS); do \
|
||||||
|
if test $$i != X; \
|
||||||
|
- then $(INSTALL_SHARED) $$i $(DESTSHARED)/$$i; \
|
||||||
|
+ then $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/$$i; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: Python-2.0.1
|
||||||
|
|
||||||
|
musl (correctly) implements the POSIX posix_close function, however
|
||||||
|
this was added well after Python 2.0.1 was released.
|
||||||
|
|
||||||
|
--- Modules/posixmodule.c 2022-09-16 16:46:09.809812072 +1000
|
||||||
|
+++ Modules/posixmodule.c 2022-09-16 16:47:23.254166370 +1000
|
||||||
|
@@ -3267,12 +3267,12 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-static char posix_close__doc__[] =
|
||||||
|
+static char py_posix_close__doc__[] =
|
||||||
|
"close(fd) -> None\n\
|
||||||
|
Close a file descriptor (for low level IO).";
|
||||||
|
|
||||||
|
static PyObject *
|
||||||
|
-posix_close(PyObject *self, PyObject *args)
|
||||||
|
+py_posix_close(PyObject *self, PyObject *args)
|
||||||
|
{
|
||||||
|
int fd, res;
|
||||||
|
if (!PyArg_ParseTuple(args, "i:close", &fd))
|
||||||
|
@@ -5300,7 +5300,7 @@
|
||||||
|
{"tcsetpgrp", posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__},
|
||||||
|
#endif /* HAVE_TCSETPGRP */
|
||||||
|
{"open", posix_open, METH_VARARGS, posix_open__doc__},
|
||||||
|
- {"close", posix_close, METH_VARARGS, posix_close__doc__},
|
||||||
|
+ {"close", py_posix_close, METH_VARARGS, py_posix_close__doc__},
|
||||||
|
{"dup", posix_dup, METH_VARARGS, posix_dup__doc__},
|
||||||
|
{"dup2", posix_dup2, METH_VARARGS, posix_dup2__doc__},
|
||||||
|
{"lseek", posix_lseek, METH_VARARGS, posix_lseek__doc__},
|
|
@ -0,0 +1,18 @@
|
||||||
|
SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: Python-2.0.1
|
||||||
|
|
||||||
|
Python 2.0.1's Makefile does not support custom CFLAGS for some
|
||||||
|
reason, so we have to patch our __DATE__ __TIME__ undefs in.
|
||||||
|
|
||||||
|
--- Makefile.in 2022-12-23 18:33:56.486325025 +1100
|
||||||
|
+++ Makefile.in 2022-12-23 18:46:05.910387214 +1100
|
||||||
|
@@ -127,7 +127,7 @@
|
||||||
|
DIST= $(DISTFILES) $(DISTDIRS)
|
||||||
|
|
||||||
|
# Compilation flags for getbuildinfo.c only
|
||||||
|
-CFLAGS= $(OPT) -I. $(DEFS)
|
||||||
|
+CFLAGS= $(OPT) -I. $(DEFS) -U__DATE__ -U__TIME__
|
||||||
|
|
||||||
|
LIBRARY= libpython$(VERSION).a
|
||||||
|
LDLIBRARY= @LDLIBRARY@
|
|
@ -0,0 +1,2 @@
|
||||||
|
https://www.python.org/ftp/python/2.0.1/Python-2.0.1.tgz 98557b819a42d2093b41d8637302d1311b81f627af9ad20036357d7eb2813872
|
||||||
|
http://ftp.unicode.org/Public/3.0-Update/UnicodeData-3.0.0.txt f41d967bc458ee106f0c3948bfad71cd0860d96c49304e3fd02eaf2bbae4b6d9
|
|
@ -0,0 +1,68 @@
|
||||||
|
# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
# Delete generated files
|
||||||
|
rm Modules/glmodule.c
|
||||||
|
rm Modules/unicodedata_db.h Objects/unicodetype_db.h
|
||||||
|
rm Modules/sre_constants.h
|
||||||
|
mv Lib/plat-generic .
|
||||||
|
rm -r Lib/plat-*
|
||||||
|
mv plat-generic Lib/
|
||||||
|
grep generated -r . -l | grep encodings | xargs rm
|
||||||
|
|
||||||
|
# Disable sre and unicodedata modules
|
||||||
|
sed -i "/^_sre/d" Modules/Setup.in
|
||||||
|
sed -i "/^unicodedata/d" Modules/Setup.in
|
||||||
|
|
||||||
|
# Patch
|
||||||
|
patch -Np0 -i disable-unicode.patch
|
||||||
|
|
||||||
|
# Regenerate autoconf
|
||||||
|
autoreconf-2.71 -fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
./configure \
|
||||||
|
--prefix="${PREFIX}" \
|
||||||
|
--libdir="${PREFIX}/lib/musl" \
|
||||||
|
--with-wctype-functions
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
# Build pgen
|
||||||
|
pushd Parser
|
||||||
|
make pgen
|
||||||
|
popd
|
||||||
|
# Regen graminit.c and graminit.h
|
||||||
|
pushd Grammar
|
||||||
|
make graminit.c
|
||||||
|
popd
|
||||||
|
|
||||||
|
# Regenerate some Python scripts using the other regenerated files
|
||||||
|
gcc -o keyword keyword.c
|
||||||
|
gcc -o token token.c
|
||||||
|
# This gets all of the grammar tokens
|
||||||
|
grep -E '\{1, "[^"]+"' Python/graminit.c | ./keyword > Lib/keyword.py.new
|
||||||
|
mv Lib/keyword.py.new Lib/keyword.py
|
||||||
|
./token Lib/symbol.py < Include/graminit.h > Lib/symbol.py.new
|
||||||
|
mv Lib/symbol.py.new Lib/symbol.py
|
||||||
|
# These get all of the #defines that have to be translated
|
||||||
|
grep '#define[[:space:]][A-Z]*[[:space:]][[:space:]]*[0-9][0-9]*' Include/token.h | ./token Lib/token.py > Lib/token.py.new
|
||||||
|
mv Lib/token.py.new Lib/token.py
|
||||||
|
|
||||||
|
# Now build the main program
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
mkdir -p "${DESTDIR}/usr"
|
||||||
|
default
|
||||||
|
|
||||||
|
# Remove non-reproducible .pyc/o files
|
||||||
|
find "${DESTDIR}" -name "*.pyc" -delete
|
||||||
|
find "${DESTDIR}" -name "*.pyo" -delete
|
||||||
|
}
|
|
@ -0,0 +1,67 @@
|
||||||
|
# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
# Delete generated files
|
||||||
|
rm Modules/glmodule.c
|
||||||
|
mv Lib/plat-generic .
|
||||||
|
rm -r Lib/plat-*
|
||||||
|
mv plat-generic Lib/
|
||||||
|
grep generated -r . -l | grep encodings | xargs rm
|
||||||
|
|
||||||
|
# Regenerate unicode
|
||||||
|
rm Modules/unicodedata_db.h Objects/unicodetype_db.h
|
||||||
|
mv ../UnicodeData-3.0.0.txt UnicodeData-Latest.txt
|
||||||
|
python Tools/unicode/makeunicodedata.py
|
||||||
|
|
||||||
|
# Regenerate sre_constants.h
|
||||||
|
rm Modules/sre_constants.h
|
||||||
|
python Lib/sre_constants.py
|
||||||
|
|
||||||
|
# Regenerate autoconf
|
||||||
|
autoreconf-2.71 -fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
./configure \
|
||||||
|
--prefix="${PREFIX}" \
|
||||||
|
--libdir="${PREFIX}/lib/musl"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
# Build pgen
|
||||||
|
pushd Parser
|
||||||
|
make pgen
|
||||||
|
popd
|
||||||
|
# Regen graminit.c and graminit.h
|
||||||
|
pushd Grammar
|
||||||
|
make graminit.c
|
||||||
|
popd
|
||||||
|
|
||||||
|
# Regenerate some Python scripts using the other regenerated files
|
||||||
|
gcc -o keyword keyword.c
|
||||||
|
gcc -o token token.c
|
||||||
|
# This gets all of the grammar tokens
|
||||||
|
grep -E '\{1, "[^"]+"' Python/graminit.c | ./keyword > Lib/keyword.py.new
|
||||||
|
mv Lib/keyword.py.new Lib/keyword.py
|
||||||
|
./token Lib/symbol.py < Include/graminit.h > Lib/symbol.py.new
|
||||||
|
mv Lib/symbol.py.new Lib/symbol.py
|
||||||
|
# These get all of the #defines that have to be translated
|
||||||
|
grep '#define[[:space:]][A-Z]*[[:space:]][[:space:]]*[0-9][0-9]*' Include/token.h | ./token Lib/token.py > Lib/token.py.new
|
||||||
|
mv Lib/token.py.new Lib/token.py
|
||||||
|
|
||||||
|
# Now build the main program
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
mkdir -p "${DESTDIR}/usr"
|
||||||
|
default
|
||||||
|
|
||||||
|
# Remove non-reproducible .pyc/o files
|
||||||
|
find "${DESTDIR}" -name "*.pyc" -delete
|
||||||
|
find "${DESTDIR}" -name "*.pyo" -delete
|
||||||
|
}
|
|
@ -103,6 +103,10 @@ build autogen-5.18.16 autogen-5.18.16.sh
|
||||||
|
|
||||||
build musl-1.2.3
|
build musl-1.2.3
|
||||||
|
|
||||||
|
build Python-2.0.1 stage1.sh
|
||||||
|
|
||||||
|
build Python-2.0.1 stage2.sh
|
||||||
|
|
||||||
if [ "$FORCE_TIMESTAMPS" = True ] ; then
|
if [ "$FORCE_TIMESTAMPS" = True ] ; then
|
||||||
echo 'Forcing all files timestamps to be 0 unix time.'
|
echo 'Forcing all files timestamps to be 0 unix time.'
|
||||||
canonicalise_all_files_timestamp
|
canonicalise_all_files_timestamp
|
||||||
|
|
Loading…
Reference in New Issue