Set environment variables without package rebuild?
- Lenguaje dominante
- Julia
- Estrellas
- 1.5k
- Forks
- 186
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I have the following in my `deps/build.jl` file:
```julia
using PyCall
PyCall.Conda.add("wfdb")
```
And inside module:
```julia
module MyPackage
const WFDB = PyNULL()
function __init__()
copy!(WFDB, pyimport("wfdb"))
end
end # module
```
But this doesn't work on Linux, because there are different paths for `PyCall.libpython` and `PyCall.Conda.PYTHONDIR`.
As explained in the PyCall documentation, I should set `ENV["PYTHON"]=""`, run `Pkg.build("PyCall")`, and re-launch Julia.
So, in GH Actions I've added a custom `run` command for MyPackage:
```yaml
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}
- uses: julia-actions/julia-buildpkg@v1
- run: julia --project=@. -e 'import Pkg; ENV["PYTHON"]=""; Pkg.add("PyCall"); Pkg.build("PyCall")'
- uses: julia-actions/julia-runtest@v1
```
But it breaks again in GH Actions for other packages, if they have MyPackage as a dependency.
So, should I really repeat this custom `run` command to all other packages that rely on MyPackage?
Or maybe I can somehow add scripts in my package, that will be run before build?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza con deps/build.jl y las instrucciones de compilación de PyCall; después, inspecciona los pasos de GitHub Actions que usan julia-actions/julia-buildpkg y julia-actions/julia-runtest. Aclara si MyPackage puede configurar PyCall antes de que se compilen los paquetes dependientes; se considera terminado cuando existe un flujo de trabajo documentado o compatible que evita repetir el comando personalizado para cada paquete dependiente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- github-actions, julia
- Área
- build-system, ci-cd
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 20/100