Comments (21)
If a tarball can be constructed to match what /usr/local
would expect, then people can use the following to extract the tarball and have all the files put in the proper place:
tar -x --strip-components 1 -f <tarball> -C /usr/local
Probably want to create a tarball with:
tar -c --xz --options xz:compression-level 9 -f <tarball name> <directory>
In terms of tarball file structure:
bin/py
share/doc/py/LICENSE
share/doc/py/README.md
share/fish/vendor_completions.d/py.fish
share/man/man1/py.1
from python-launcher.
If you need someone else to submit this to upstream Homebrew, I'd be happy to!
from python-launcher.
@henryiii it's a configuration thing I don't want to bother solving right now since I can cross-compile on my own machine and upload manually. 😄
from python-launcher.
See if PGO makes a difference: https://doc.rust-lang.org/rustc/profile-guided-optimization.html
from python-launcher.
https://www.marcoieni.com/2020/12/rust-makes-cross-compilation-childs-play/
from python-launcher.
Should build for (if possible; will depend on GitHub Actions and cross):
- macOS x64
- macOS ARM
- Linux x64
- Linux ARM
- Windows x64
- Windows ARM
Package everything as:
from python-launcher.
Is it worth running strip
on the binaries? I would assume cargo build --release
did the right thing. Plus ripgrep makes it look like a pain.
from python-launcher.
Might be worth looking into installers for:
- macOS
- Linux (via Snap?)
from python-launcher.
Getting on to Homebrew might be tricky since https://docs.brew.sh/Acceptable-Formulae says self-submitted is frowned upon until a project is popular. Might need to create my own tap to at least start.
from python-launcher.
Based on rustc support and cross support, probably will start with building:
- x86_64-apple-darwin (rustc)
- aarch64-apple-darwin (rustc)
- x86_64-unknown-linux-gnu (rustc)
- aarch64-unknown-linux-gnu (cross)
- riscv64gc-unknown-linux-gnu (cross)
- x86_64-sun-solaris (cross)
- x86_64-unknown-freebsd (cross)
- x86_64-unknown-dragonfly (cross)
- x86_64-unknown-netbsd (cross)
Windows is not a concern as there isn't Windows support yet. Everything else either isn't an OS people run as a dev platform (and thus the Launcher isn't appropriately for), or isn't easily available via cross.
from python-launcher.
https://github.com/actions-rs/cargo#cross-compilation
https://github.com/rust-github/template/blob/main/.github/workflows/cd.yml
from python-launcher.
Probably should also upload the SHA256 signatures for each file.
from python-launcher.
For Homebrew, you need to know things like which path is for completions, man page, etc. Since that info is also necessary to create the tarball appropriately, probably going to need to write out some config data to map repo paths to file purpose.
from python-launcher.
To generate the Homebrew formula, there's a cookbook, class details, and can use ripgrep's formula as guidance. Also might want an alias like ripgrep for rg
if "py" is not already taken.
from python-launcher.
Built for Apple Silicon on my x64 Mac:
rustup target add aarch64-apple-darwin
cargo build --release --target aarch64-apple-darwin
Binary ends up in target/aarch64-apple-darwin/release/py
.
from python-launcher.
Building binaries thanks to 020a171. Still need to do some other release-related steps, but it's a start.
from python-launcher.
It seems tar
on macOS lacks zstd support, but it does have lzma/xz support, so that's probably the best option for compressing tarballs.
from python-launcher.
https://github.blog/2021-03-11-scripting-with-github-cli/#using-gh-in-github-actions on how to use gh
from within Actions.
from python-launcher.
0cb42a8 got the tarball being created.
from python-launcher.
Final build targets that work:
- x86_64-apple-darwin (rustc)
- x86_64-unknown-linux-gnu (rustc)
- aarch64-unknown-linux-gnu (cross)
- riscv64gc-unknown-linux-gnu (cross)
- x86_64-unknown-netbsd (cross)
from python-launcher.
You should be able to cross compile AS on macos-10.15, because it has Xcode 12? We are cross compiling wheels with it, anyway. Edit: looks like you tried it. Found the logs, maybe it's a Rust thing?
from python-launcher.
Related Issues (20)
- py will loop forever if used as python symlink HOT 5
- Consider auto-generated changelog
- Replace control flow diagram with Mermaid
- Bump serial_test_derive from 0.5.1 to 0.6.0 HOT 2
- Find a replacement for stderrlog HOT 6
- Have `rustfmt` group `use` statements HOT 2
- $PY_PYTHON is not being honoring on a brew installed py on macOS HOT 1
- Use `std::hint::black_box` with the benchmarks
- Create a logo HOT 8
- Automate the execution of cog via `justfile`
- Document the release process
- Add a FAQ entry about how to turn off `.venv` usage HOT 1
- No configurations support (or undocumentd) aka py.ini
- Manpage wording around `--list` and virtual environments confusing HOT 5
- Manpage typos HOT 3
- Local virtualenv not found on WSL2 HOT 2
- Support PEP 723
- Update `docs/requirements.txt`
- Add Repology badge to website
- Update installation instructions for NixOS package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-launcher.