Skip to content

Commit 28ec945

Browse files
authored
Bring this project back to the modern world (#139)
* Bump `scalafmt` to 3.10.1 (was 3.4.3) * Bump things to the point where it actually compiles - bump `sbt` to 1.11.7 (was 1.7.1) - bump `sbt-mdoc` to 2.8.0 (was 2.3.3) - bump `sbt-ci-release` to 1.11.2 (was 1.5.10) - bump `sbt-scalafix` to 0.14.4 (was 0.10.1) - bump Scala 2.12 to 2.12.20 (was 2.12.15) - bump Scala 2.13 to 2.13.17 (was 2.13.6) - bump Scala 3 to 3.3.7 (was 3.0.2) * Make sure `coursier` install sbt on the CI
1 parent 31b17a3 commit 28ec945

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: coursier/setup-action@v1
2323
with:
2424
jvm: ${{ matrix.jdk }}
25-
apps: sbtn
25+
apps: sbtn sbt
2626
- name: Set up Python ${{ matrix.python }}
2727
uses: actions/setup-python@v2
2828
with:

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "3.4.3"
1+
version = "3.10.1"
22
align.preset = more
33
maxColumn = 100
44
runner.dialect = scala213source3

build.sbt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ inThisBuild(
55
organization := "ai.kien",
66
homepage := Some(url("https://github.com/kiendang/python-native-libs")),
77
licenses := List("BSD-3-Clause" -> url("https://opensource.org/licenses/BSD-3-Clause")),
8-
developers := List(
8+
developers := List(
99
Developer(
1010
"kiendang",
1111
"Dang Trung Kien",
@@ -16,9 +16,9 @@ inThisBuild(
1616
)
1717
)
1818

19-
lazy val scala212 = "2.12.15"
20-
lazy val scala213 = "2.13.6"
21-
lazy val scala3 = "3.0.2"
19+
lazy val scala212 = "2.12.20"
20+
lazy val scala213 = "2.13.17"
21+
lazy val scala3 = "3.3.7"
2222

2323
ThisBuild / scalaVersion := scala213
2424
ThisBuild / scalafixDependencies += organizeImports
@@ -46,10 +46,11 @@ lazy val root = project
4646
}
4747
}
4848
)
49-
.settings(
50-
sonatypeCredentialHost := "s01.oss.sonatype.org",
51-
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
52-
)
49+
// TODO: reconfigure sonatype publishing
50+
// .settings(
51+
// sonatypeCredentialHost := "s01.oss.sonatype.org",
52+
// sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
53+
// )
5354

5455
lazy val docs = project
5556
.in(file("python-docs"))

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.7.1
1+
sbt.version=1.11.7

project/plugins.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.3")
2-
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
3-
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")
1+
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.8.0")
2+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.2")
3+
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.4")

src/main/scala/ai/kien/python/Python.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Python private[python] (
8989
rawLdflags <- rawLdflags
9090
nativeLibraryPaths <- nativeLibraryPaths
9191
libPathFlags = nativeLibraryPaths.map("-L" + _)
92-
flags = rawLdflags
92+
flags = rawLdflags
9393
.split("\\s+(?=-)")
9494
.filter(f => f.nonEmpty && !libPathFlags.contains(f))
9595
.flatMap(f => if (f.startsWith("-L")) Array(f) else f.split("\\s+"))
@@ -107,7 +107,7 @@ class Python private[python] (
107107

108108
private def existsInPath(exec: String): Boolean = {
109109
val pathExts = getEnv("PATHEXT").getOrElse("").split(pathSeparator)
110-
val l = for {
110+
val l = for {
111111
elem <- path.split(pathSeparator).iterator
112112
elemPath = fs.getPath(elem)
113113
ext <- pathExts.iterator

0 commit comments

Comments
 (0)