Skip to content

Commit e00d13a

Browse files
committed
[GR-13213] Add a simple pip sub for us
PullRequest: graalpython/344
2 parents 0158bfd + f1dd563 commit e00d13a

File tree

3 files changed

+462
-2
lines changed

3 files changed

+462
-2
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,28 @@ To try it, you can use the bundled releases from
1414
some examples of what you can do with it, check out the
1515
[reference](https://www.graalvm.org/docs/reference-manual/languages/python/).
1616

17+
### Installing packages
18+
19+
At the moment not enough of the standard library is implemented to run the
20+
standard package installers for many packages. As a convenience, we provide a
21+
simple module to install packages that we know to be working (including
22+
potential patches required for those packages). Try the following to find out
23+
more:
24+
25+
```
26+
graalpython -m ginstall --help
27+
```
28+
29+
As a slightly more exciting example, try:
30+
31+
```
32+
graalpython -m ginstall install numpy
33+
```
34+
35+
If all goes well (you'll need to have `clang`, `llvm-link`, `llvm-extract`,
36+
`llvm-nm`, and `opt` in your `PATH` in addition to the normal NumPy build
37+
dependencies), you should be able to `import numpy` afterwards.
38+
1739
### Licensing
1840

1941
This Graal/Truffle-based implementation of Python is copyright (c) 2017, 2018
@@ -23,3 +45,4 @@ Universal Permissive License v 1.0 as shown at
2345
implementation is in part derived from and contains additional code from 3rd
2446
parties, the copyrights and licensing of which is detailed in the
2547
[LICENSE](LICENSE) and [3rd_party_licenses.txt](3rd_party_licenses.txt) files.
48+

graalpython/lib-graalpython/_sre.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -319,7 +319,7 @@ def findall(self, string, pos=0, endpos=-1):
319319
self.__check_input_type(string)
320320
if endpos > len(string):
321321
endpos = len(string)
322-
elif endpos < 0:
322+
elif endpos < 0 and len(string) > 0:
323323
endpos = endpos % len(string) + 1
324324
matchlist = []
325325
while pos < endpos:

0 commit comments

Comments
 (0)