From 45ef42681658dce5e1ee0fa28e991d1cc856159c Mon Sep 17 00:00:00 2001 From: Mark Kittisopikul Date: Sun, 20 Nov 2022 21:02:34 -0500 Subject: [PATCH 1/7] Bump pypi-publish github action to 1.5.1 --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 02424da2..bb785e22 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,7 +29,7 @@ jobs: if: >- (github.ref == 'refs/heads/release/test') || (github.ref == 'refs/heads/release/main') - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 # v1.4.2 + uses: pypa/gh-action-pypi-publish@37f50c210e3d2f9450da2cd423303d6a14a6e29f # v1.5.1 with: password: ${{ secrets.test_pypi_password }} repository_url: https://test.pypi.org/legacy/ @@ -70,6 +70,6 @@ jobs: - run: ls -lh dist - name: Publish distribution 📦 to PyPI if: github.ref == 'refs/heads/release/main' - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 # v1.4.2 + uses: pypa/gh-action-pypi-publish@37f50c210e3d2f9450da2cd423303d6a14a6e29f # v1.5.1 with: password: ${{ secrets.pypi_password }} From 69234e23117ec156abc26613facde2ad2d725fad Mon Sep 17 00:00:00 2001 From: Manuel Berkemeier Date: Wed, 16 Jun 2021 13:34:53 +0200 Subject: [PATCH 2/7] modified julia_py_executable to respect PYTHONPATH --- src/julia/tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/julia/tools.py b/src/julia/tools.py index cea8fb8a..643ac765 100644 --- a/src/julia/tools.py +++ b/src/julia/tools.py @@ -165,7 +165,8 @@ def julia_py_executable(): # if no candidate in an alternate scheme, try the standard install location # see https://docs.python.org/3/install/index.html#alternate-installation scripts_paths = [ - sysconfig.get_path("scripts", scheme) for scheme in sysconfig.get_scheme_names() + *[ os.path.join(pypath, "bin") for pypath in os.environ.get("PYTHONPATH").split(os.pathsep) ], + *[sysconfig.get_path("scripts", scheme) for scheme in sysconfig.get_scheme_names()], ] scripts_paths.append(sysconfig.get_path("scripts")) From 51ef29c0e765b8b140d17ecd9fa497f279830b3a Mon Sep 17 00:00:00 2001 From: Manuel Berkemeier Date: Wed, 16 Jun 2021 13:42:02 +0200 Subject: [PATCH 3/7] comments for julia_py_executable --- src/julia/tools.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/julia/tools.py b/src/julia/tools.py index 643ac765..c789cff8 100644 --- a/src/julia/tools.py +++ b/src/julia/tools.py @@ -162,11 +162,12 @@ def julia_py_executable(): # try to find installed julia-py script - check scripts folders under different installation schemes # we check the alternate schemes first, at most one of which should give us a julia-py script + # if the environment variable `PYTHONPATH` is set, we additionally check whether the script is there # if no candidate in an alternate scheme, try the standard install location # see https://docs.python.org/3/install/index.html#alternate-installation scripts_paths = [ - *[ os.path.join(pypath, "bin") for pypath in os.environ.get("PYTHONPATH").split(os.pathsep) ], - *[sysconfig.get_path("scripts", scheme) for scheme in sysconfig.get_scheme_names()], + *[ sysconfig.get_path("scripts", scheme) for scheme in sysconfig.get_scheme_names() ], + *[ os.path.join(pypath, "bin") for pypath in os.environ.get("PYTHONPATH").split(os.pathsep) ] ] scripts_paths.append(sysconfig.get_path("scripts")) From dd1063bf8945a83d9145238defa5ee88f3234aa2 Mon Sep 17 00:00:00 2001 From: Mark Kittisopikul Date: Mon, 21 Nov 2022 00:29:52 -0500 Subject: [PATCH 4/7] Add a default to os.environ.get("PYTHONPATH") --- src/julia/tools.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/julia/tools.py b/src/julia/tools.py index c789cff8..35c18b36 100644 --- a/src/julia/tools.py +++ b/src/julia/tools.py @@ -166,8 +166,14 @@ def julia_py_executable(): # if no candidate in an alternate scheme, try the standard install location # see https://docs.python.org/3/install/index.html#alternate-installation scripts_paths = [ - *[ sysconfig.get_path("scripts", scheme) for scheme in sysconfig.get_scheme_names() ], - *[ os.path.join(pypath, "bin") for pypath in os.environ.get("PYTHONPATH").split(os.pathsep) ] + *[ + sysconfig.get_path("scripts", scheme) + for scheme in sysconfig.get_scheme_names() + ], + *[ + os.path.join(pypath, "bin") + for pypath in os.environ.get("PYTHONPATH", "").split(os.pathsep) + ], ] scripts_paths.append(sysconfig.get_path("scripts")) From 37bbded019710d939f976babeaf84382b2bd375a Mon Sep 17 00:00:00 2001 From: Mark Kittisopikul Date: Mon, 21 Nov 2022 01:30:13 -0500 Subject: [PATCH 5/7] Don't search empty path --- src/julia/tools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/julia/tools.py b/src/julia/tools.py index 35c18b36..b1b86b82 100644 --- a/src/julia/tools.py +++ b/src/julia/tools.py @@ -173,6 +173,7 @@ def julia_py_executable(): *[ os.path.join(pypath, "bin") for pypath in os.environ.get("PYTHONPATH", "").split(os.pathsep) + if pypath ], ] scripts_paths.append(sysconfig.get_path("scripts")) From 28449f76199f874a14cc47420c1f78464ea08860 Mon Sep 17 00:00:00 2001 From: Miles Cranmer Date: Mon, 27 Feb 2023 02:47:26 -0700 Subject: [PATCH 6/7] Fix PyJulia on Julia 1.9 (#523) * Correct CLI parsing for Julia 1.9 to fix #522 * Bump min Julia version to 1.4 --- .github/workflows/main.yml | 2 +- README.md | 2 +- src/julia/tools.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8abbe999..86a527e3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: - '3.9' - '3.10' julia-version: - - '1.0' + - '1.4' - '1.6' - '1.7' - '1.8' diff --git a/README.md b/README.md index 5eb77142..2df8ee4c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ PyJulia [![Main workflow](https://github.com/JuliaPy/pyjulia/workflows/Main%20workflow/badge.svg)](https://github.com/JuliaPy/pyjulia/actions?query=workflow%3A%22Main+workflow%22) [![DOI](https://zenodo.org/badge/14576985.svg)](https://zenodo.org/badge/latestdoi/14576985) -Experimenting with developing a better interface to [Julia language](https://julialang.org/) that works with [Python](https://www.python.org/) 2 & 3 and Julia v1.0+. +Experimenting with developing a better interface to [Julia language](https://julialang.org/) that works with [Python](https://www.python.org/) 3 and Julia v1.4+. Quick usage ----------- diff --git a/src/julia/tools.py b/src/julia/tools.py index b1b86b82..13bf2f4a 100644 --- a/src/julia/tools.py +++ b/src/julia/tools.py @@ -96,8 +96,8 @@ def install(julia="julia", color="auto", python=None, quiet=False): OP = "build" if python else "install" install_cmd = julia_cmd + [ - os.path.join(os.path.dirname(os.path.realpath(__file__)), "install.jl"), "--", + os.path.join(os.path.dirname(os.path.realpath(__file__)), "install.jl"), OP, python or sys.executable, libpython, From 69b734f117e489904a07d20f46c8f96b56577779 Mon Sep 17 00:00:00 2001 From: Miles Cranmer Date: Mon, 27 Feb 2023 22:56:42 -0700 Subject: [PATCH 7/7] Bump version to 0.6.1 with Julia 1.9 fix (#524) --- .github/workflows/publish.yml | 2 +- ci/test-upload/tox.ini | 2 +- docs/source/conf.py | 4 ++-- src/julia/release.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bb785e22..80c77b8f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -57,7 +57,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: # using `matrix` to define a constant - package: ['julia==0.6.0'] + package: ['julia==0.6.1'] steps: - name: Set up Python 3.9 uses: actions/setup-python@v1 diff --git a/ci/test-upload/tox.ini b/ci/test-upload/tox.ini index acc6ed08..8ccc7e2c 100644 --- a/ci/test-upload/tox.ini +++ b/ci/test-upload/tox.ini @@ -16,7 +16,7 @@ deps = commands = shell-retry --backoff=2 --interval-max=20 --retry-count=30 --verbose -- \ - pip install --index-url https://test.pypi.org/simple/ julia==0.6.0 + pip install --index-url https://test.pypi.org/simple/ julia==0.6.1 python -c "from julia import install; install()" python -m julia.runtests -- \ diff --git a/docs/source/conf.py b/docs/source/conf.py index 0142ea44..ee0e1f2b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -25,9 +25,9 @@ author = 'The Julia and IPython development teams' # The short X.Y version -version = '0.6.0' +version = '0.6.1' # The full version, including alpha/beta/rc tags -release = '0.6.0' +release = '0.6.1' # -- General configuration --------------------------------------------------- diff --git a/src/julia/release.py b/src/julia/release.py index f014f579..b91b9912 100644 --- a/src/julia/release.py +++ b/src/julia/release.py @@ -1,5 +1,5 @@ # This file is executed via setup.py and imported via __init__.py -__version__ = "0.6.0" +__version__ = "0.6.1" # For Python versioning scheme, see: # https://www.python.org/dev/peps/pep-0440/#version-scheme