Skip to content

Commit 00d4077

Browse files
committed
fix dash vs underscore
1 parent 5147aea commit 00d4077

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

regi-headless/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ tasks.register('bundlePython', Sync) {
7676

7777
dependsOn jar
7878

79-
into layout.buildDirectory.dir("install/regi-python")
79+
into layout.buildDirectory.dir("install/regi_python")
8080

8181
inputs.dir("src/main/python")
8282
inputs.file(jar.archiveFile)
@@ -92,7 +92,7 @@ tasks.register('bundlePython', Sync) {
9292
exclude 'pyproject.toml'
9393
}
9494

95-
into('regi-python/lib') {
95+
into('regi_python/lib') {
9696
from configurations.runtimeClasspath
9797
from jar.archiveFile
9898
exclude "**/*.nbm"
@@ -106,20 +106,20 @@ tasks.register('buildPythonWheel', VenvTask) {
106106
dependsOn bundlePython
107107
dependsOn installPythonBuildTools
108108

109-
workingDir = layout.buildDirectory.dir("install/regi-python").get().asFile
109+
workingDir = layout.buildDirectory.dir("install/regi_python").get().asFile
110110
venvExec = "python"
111111
args = ["-m", "build", "--wheel"]
112112

113-
inputs.files(fileTree(layout.buildDirectory.dir("install/regi-python")) {
113+
inputs.files(fileTree(layout.buildDirectory.dir("install/regi_python")) {
114114
exclude "dist/**"
115115
exclude "build/**"
116116
exclude "*.egg-info/**"
117117
})
118118
inputs.property("version", project.version.toString())
119-
outputs.dir(layout.buildDirectory.dir("install/regi-python/dist"))
119+
outputs.dir(layout.buildDirectory.dir("install/regi_python/dist"))
120120

121121
doFirst {
122-
delete layout.buildDirectory.dir("install/regi-python/dist")
122+
delete layout.buildDirectory.dir("install/regi_python/dist")
123123
}
124124

125125
doLast {
@@ -135,16 +135,16 @@ tasks.register('installPythonWheelForSmokeTest', VenvTask) {
135135

136136
venvExec = 'pip'
137137

138-
inputs.files(fileTree(dir: "${buildDir}/install/regi-python/dist", include: '*.whl'))
138+
inputs.files(fileTree(dir: "${buildDir}/install/regi_python/dist", include: '*.whl'))
139139
outputs.file(layout.buildDirectory.file("test-python-wheel/install.marker"))
140140

141141
doFirst {
142-
def wheelFile = fileTree(dir: "${buildDir}/install/regi-python/dist", include: '*.whl').singleFile
142+
def wheelFile = fileTree(dir: "${buildDir}/install/regi_python/dist", include: '*.whl').singleFile
143143
args = ['install', '--force-reinstall', wheelFile.absolutePath]
144144
}
145145

146146
doLast {
147-
def wheelFile = fileTree(dir: "${buildDir}/install/regi-python/dist", include: '*.whl').singleFile
147+
def wheelFile = fileTree(dir: "${buildDir}/install/regi_python/dist", include: '*.whl').singleFile
148148
def markerFile = layout.buildDirectory.file("test-python-wheel/install.marker").get().asFile
149149
markerFile.parentFile.mkdirs()
150150
markerFile.text = "${wheelFile.name}\n${wheelFile.length()} bytes\n"

regi-headless/src/main/python/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "regi-python"
77
version = "@VERSION@"
8-
description = "USACE Regi-Headless Python Bridge"
8+
description = "USACE REGI Python Bridge"
99
dependencies = [
1010
"JPype1>=1.4.1",
1111
]
1212

1313
[tool.setuptools]
14-
packages = ["regi-python"]
14+
packages = ["regi_python"]
1515

1616
[tool.setuptools.package-data]
17-
"regi-python" = ["lib/*.jar"]
17+
"regi_python" = ["lib/*.jar"]

regi-headless/src/main/python/regi_python/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
__all__ = ["regi_session", "run_headless"]
55

66
try:
7-
__version__ = version("regi_python") # Use the 'name' from pyproject.toml
7+
__version__ = version("regi_python")
88
except PackageNotFoundError:
99
# package is not installed
1010
__version__ = "unknown"

regi-headless/src/main/python/regi_python/regi_python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import jpype.imports
1010
from contextlib import contextmanager
1111
from pathlib import Path
12-
from regi_python_logging import configure_logging
12+
from .regi_python_logging import configure_logging
1313

1414
logger = configure_logging()
1515

0 commit comments

Comments
 (0)