Skip to content

Commit

Permalink
build files for pyjulia
Browse files Browse the repository at this point in the history
  • Loading branch information
mjohnson541 committed Jan 22, 2023
1 parent 466b710 commit b3f6136
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
31 changes: 31 additions & 0 deletions pyjulia/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
python -m pip install --no-deps --ignore-installed .

#mkdir $PREFIX/share/julia/site
#mkdir $PREFIX/share/julia/site/registries
#mkdir $PREFIX/share/julia/site/registries/General
#git clone https://github.com/JuliaRegistries/General.git $PREFIX/share/julia/site/registries/General

#python -c "import julia; julia.install()"

#rm -rf $PREFIX/share/julia/site/compiled/*
#var="const ROOTENV = \"${PREFIX}\""

unamestr=$(uname)
if [[ "$unamestr" == "Linux" ]]; then
sed -i 's|bin/python|bin/python3|g' $(which python-jl) #use python3 rather than python so python-jl works after linking
#for d in ${PREFIX}/share/julia/site/packages/Conda/*/ ; do
# sed -i "1s/.*/$var/" ${d}/deps/deps.jl
#done
elif [[ "$unamestr" == "Darwin" ]]; then
sed -i ".bak" 's|bin/python|bin/python3|g' $(which python-jl) #use python3 rather than python so python-jl works after linking
#for d in ${PREFIX}/share/julia/site/packages/Conda/*/ ; do
# echo $d
# sed -i ".bak" "1s|.*|$var|" ${d}/deps/deps.jl
#done
fi

#echo $(which python-jl)
#echo $(which python)
#ln -sfn $(which python-jl) $(which python)
#python-jl -c "from julia import Main"
#python -c "from julia import Main"
39 changes: 39 additions & 0 deletions pyjulia/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{% set version = "0.5.3" %}
{% set name = "julia" %}

package:
name: pyjulia
version: {{ version }}

source:
fn: {{ name }}-{{ version }}.tar.gz
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: b13207125709fdba069a25c4e54ff366f0bc308807b2aa0f3b66924101799c58

build:
number: '1'
string: rmg_1

requirements:
build:
- python=3.7
- pip
- julia>1
run:
- python=3.7
- julia>1

test:
imports:
- julia
#commands:
#- python -c "from julia.api import Julia; jl = Julia(compiled_modules=False); from julia import Main"
#- python-jl -c "from julia import Main"

about:
home: https://github.com/JuliaPy/pyjulia
license: MIT
license_file: 'LICENSE.md'
license_family: MIT
summary: "python interface to julia"

0 comments on commit b3f6136

Please sign in to comment.