Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow options to be passed through in Pkg.build #20082

Closed
dpsanders opened this issue Jan 17, 2017 · 8 comments
Closed

Allow options to be passed through in Pkg.build #20082

dpsanders opened this issue Jan 17, 2017 · 8 comments
Labels
domain:packages Package management and loading

Comments

@dpsanders
Copy link
Contributor

We should allow Pkg.build (or the equivalent in Pkg3) to pass through keyword arguments to the package it's building, to be able to do e.g.

Pkg.build("IJulia", jupyter=false)
@tkelman tkelman added the domain:packages Package management and loading label Jan 17, 2017
@tkelman
Copy link
Contributor

tkelman commented Jan 17, 2017

What would they translate to? It's a separate julia process so it's not sharing variables, and there's no requirement for deps/build.jl scripts to contain anything specific.

@dpsanders
Copy link
Contributor Author

dpsanders commented Jan 17, 2017 via email

@tkelman
Copy link
Contributor

tkelman commented Jan 17, 2017

I'd personally like to move away from executing a script at package install time, and entirely encode things to download, library dependency versions etc in a set of standardized toml files. I think Stefan has something like that in mind for package configuration options, if you check the Pkg3 julep.

@dpsanders
Copy link
Contributor Author

Sure, sounds good.

My point is just that there should be the possibility of the user choosing configure options for the build in different ways, e.g. by keyword arguments at the time you download / build the package.

An example is the one I gave, where IJulia.jl can either use a local Jupyter installation, or download its own -- this is a user choice that should be easily configurable.

@maleadt
Copy link
Member

maleadt commented Jan 17, 2017

I'd be interested in such functionality. Right now, I use environment variables for this purpose, eg. LLVM.jl's build.jl listens to USE_SYSTEM_LLVM, LLVM_VER, etc.

@chakravala
Copy link
Contributor

This would also be useful for my package Reduce.jl, which depends on the download and installation of an externally distributed library. There are actually 2 different versions of the library CSL & PSL reduce (one has better UTF8 support but the other is more portable). If there was an option in the build system, the user could specify which version to download using the build command.

At the moment, I am relying on environment variables to detect this as well.

@oschulz
Copy link
Contributor

oschulz commented Dec 28, 2017

Enviroment variables may be the better solution here, as the user may not trigger Pkg.build directly, or may not always remember which options to pass. Environment variables allow for external control - this is especially useful in a multi-user context (resp. a situation where users live in a predefined environment and may not need/want to know about build options for individual packages). Also in software containers (Docker & Co. all have good management for environment variables), explicit Pkg.build options will be more difficult to set consistently.

@simonbyrne
Copy link
Contributor

I think the eventual plan with the new Pkg is to do this as part of the config, see JuliaLang/Pkg.jl#458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:packages Package management and loading
Projects
None yet
Development

No branches or pull requests

6 participants