Skip to content

Commit 9eacdbc

Browse files
committed
Add badges
1 parent dc7f87d commit 9eacdbc

File tree

3 files changed

+16
-21
lines changed

3 files changed

+16
-21
lines changed

README.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
## Overview
1+
# python-native-libs
22

3-
The canonical use case is to help set up [`ScalaPy`](https://scalapy.dev/) to point to a specific Python installation by attempting to infer the correct configuration properties used by `ScalaPy` during the initialization of the embedded Python interpreter. This could potentially see usage outside of `ScalaPy` too since these properties are relevant to embedded Python in general.
3+
Helpers for setting up an embedded Python interpreter
44

5-
## Installation
5+
![Build Status](https://github.com/kiendang/python-native-libs/actions/workflows/ci.yml/badge.svg)
6+
[![Maven Central](https://img.shields.io/maven-central/v/ai.kien/python-native-libs_2.13.svg)](https://maven-badges.herokuapp.com/maven-central/ai.kien/python-native-libs_2.13)
67

7-
```scala
8-
libraryDependencies += "ai.kien" %% "python-native-libs" % "0.2.1"
9-
```
8+
## Overview
9+
10+
The canonical use case is to help set up [`ScalaPy`](https://scalapy.dev/) to point to a specific Python installation by attempting to infer the correct configuration properties used by `ScalaPy` during the initialization of the embedded Python interpreter. This could potentially see usage outside of `ScalaPy` too since these properties are relevant to embedded Python in general.
1011

1112
## Usage
1213

@@ -95,16 +96,16 @@ See `docs/details.md` to see the full list of these properties and what they mea
9596
`scalapyProperties` contains the system properties used by `ScalaPy`. For example, to set up `ScalaPy` to use the Python located at `/usr/bin/python3` in [`Ammonite`](https://ammonite.io/) or [`Almond`](https://almond.sh/) run
9697

9798
```scala
98-
import $ivy.`ai.kien::python-native-libs:0.2.1`
99+
import $ivy.`ai.kien::python-native-libs:<version>`
100+
import $ivy.`me.shadaj::scalapy-core:<scalapy_version>`
101+
99102
import ai.kien.python.Python
100103

101104
Python("/usr/bin/python3").scalapyProperties.fold(
102105
ex => println(s"Error while getting ScalaPy properties: $ex"),
103106
props => props.foreach { case(k, v) => System.setProperty(k, v) }
104107
)
105108

106-
107-
import $ivy.`me.shadaj::scalapy-core:0.5.0`
108109
import me.shadaj.scalapy.py
109110

110111
println(py.module("sys").version)

build.sbt

+1-3
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ lazy val docs = project
7878
.in(file("python-docs"))
7979
.settings(
8080
mdocVariables := Map(
81-
"VERSION" -> "0.2.1",
82-
"SCALAPY_VERSION" -> scalapyVersion,
83-
"PYTHON" -> "/usr/bin/python3"
81+
"PYTHON" -> "/usr/bin/python3"
8482
)
8583
)
8684
.dependsOn(root)

docs/readme.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
## Overview
21

3-
The canonical use case is to help set up [`ScalaPy`](https://scalapy.dev/) to point to a specific Python installation by attempting to infer the correct configuration properties used by `ScalaPy` during the initialization of the embedded Python interpreter. This could potentially see usage outside of `ScalaPy` too since these properties are relevant to embedded Python in general.
42

5-
## Installation
3+
## Overview
64

7-
```scala
8-
libraryDependencies += "ai.kien" %% "python-native-libs" % "@VERSION@"
9-
```
5+
The canonical use case is to help set up [`ScalaPy`](https://scalapy.dev/) to point to a specific Python installation by attempting to infer the correct configuration properties used by `ScalaPy` during the initialization of the embedded Python interpreter. This could potentially see usage outside of `ScalaPy` too since these properties are relevant to embedded Python in general.
106

117
## Usage
128

@@ -45,16 +41,16 @@ See `docs/details.md` to see the full list of these properties and what they mea
4541
`scalapyProperties` contains the system properties used by `ScalaPy`. For example, to set up `ScalaPy` to use the Python located at `@PYTHON@` in [`Ammonite`](https://ammonite.io/) or [`Almond`](https://almond.sh/) run
4642

4743
```scala
48-
import $ivy.`ai.kien::python-native-libs:@VERSION@`
44+
import $ivy.`ai.kien::python-native-libs:<version>`
45+
import $ivy.`me.shadaj::scalapy-core:<scalapy_version>`
46+
4947
import ai.kien.python.Python
5048

5149
Python("@PYTHON@").scalapyProperties.fold(
5250
ex => println(s"Error while getting ScalaPy properties: $ex"),
5351
props => props.foreach { case(k, v) => System.setProperty(k, v) }
5452
)
5553

56-
57-
import $ivy.`me.shadaj::scalapy-core:@SCALAPY_VERSION@`
5854
import me.shadaj.scalapy.py
5955

6056
println(py.module("sys").version)

0 commit comments

Comments
 (0)