GithubHelp home page GithubHelp logo

adriankoshka / javalang Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 56 KB

A bit of code to put a JDK into a wheel, so you can distribute java as a python wheel

License: Apache License 2.0

Python 97.73% Nix 2.27%
adoptium java python3 wheel

javalang's Introduction

Javalang

⚠️ IF YOU USE THIS FOR PRODUCTION, IT IS AT YOUR OWN RISK ⚠️

A python script which "generates" a python wheel configuration for a specified OS and architecture of Adoptium's JDK/JRE.

Why?

I was inspired by the ziglang python package, so I decided to take Adoptium's JDK/JRE and ship it as a python wheel.

How do I use this?

After cloning the git repo, it's pretty simple, gen-build-dir.py does most of the heavy lifting:

$ python3 gen-build-dir.py -o linux -a x64
$ cd linux-x64-javalang
$ python -m build # you can make a venv first and install build within there if you want

Now you can find your wheel in linux-x64-javalang/dist. Once you install the wheel, you can use it just like ziglang:

import sys, subprocess

subprocess.call([sys.executable, "-m", "javalang", "--help"])

The operating system supported are:

  • linux
  • mac
  • windows

The architectures supported are any Adoptium supports for the particular OS.

Usage

$ python3 gen-build-dir.py --help
usage: gen-build-dir.py [-h] [-o os] [-a architecture] [-j java_ver] [-r]

Toggle switch ports for link testing.

options:
  -h, --help            show this help message and exit
  -o os, --operating-system os
                        Specify an operating system
  -a architecture, --architecture architecture
                        Specify an architecture
  -j java_ver, --java-version java_ver
                        Specify a version of java (17.0.3+7 or 18.0.1+10)
  -r, --jre             Specify you want the JRE instead of the JDK

javalang's People

Contributors

adriankoshka avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.