[swift-build-dev] Swift Package Manager - Support for downloading/installing external dependencies that a Swift Package may have

Ricardo N Olivieri ricardo.olivieri at us.ibm.com
Tue Jan 26 11:47:48 CST 2016


Thanks Max for your answer. To your point, thinking about it more, it's 
probably not a great idea to have SPM execute arbitrary scripts.

It is good news to hear that something similar to option #1 could be 
implemented and that there are plans to provide something as part of SPM 
that can take of installing/downloading external [non-Swift package] 
dependencies that a Swift Package may depend on.

Does providing this functionality in SPM have a high priority? Any other 
details about the plans for this feature that could be shared at this 
point?

Regards,
   Ricardo Olivieri
   Software Engineer


From:   Max Howell <max.howell at apple.com>
To:     Ricardo N Olivieri/Austin/IBM at IBMUS
Cc:     swift-build-dev at swift.org
Date:   01/25/2016 06:53 PM
Subject:        Re: [swift-build-dev] Swift Package Manager - Support for 
downloading/installing external dependencies that a Swift Package may have
Sent by:        max.howell at apple.com



Yes, we plan to provide something here.

1) Swift Packages can specify dependencies on other libraries that are not 
Swift Packages (such as C libraries). The Swift Package Manager could then 
"parse" this metadata, download and install the corresponding dependencies 
on the system (e.g. by executing apt-get or similar commands). This could 
be part of the Packages.swift file or a new file for specifying 
dependencies that are not Swift Packages.

It couldn’t really be this simple, but we can do something like this.

2) Define a naming convention for a script that, if found inside a Swift 
Package, is executed by the Swift Package Manager. This script could 
contain any set of instructions that should be executed as part of the 
installation of the Swift Package, such as downloading and installing any 
dependencies that the Swift Package needs. For instance, such a file could 
include instructions similar to those found here: 
https://gist.github.com/edouard-lopez/503d40a5c1a49cf8ae87

We don’t intend to execute arbitrary scripts.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20160126/83f21062/attachment.html>


More information about the swift-build-dev mailing list