Skip to content

Commit

Permalink
Update to not require version.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed Feb 26, 2025
1 parent 04c3874 commit 2d4b2ab
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ scripts.BasicSConstruct(
"sdm_schemas",
disableCc=True,
noCfgFile=True,
versionModuleName="python/lsst/sdm/schemas/version.py"
versionModuleName=None
)
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ dynamic = ["version"]
[tool.setuptools.dynamic]
version = { attr = "lsst_versions.get_lsst_version" }

[tool.lsst_versions]
write_to = "python/lsst/sdm/schemas/version.py"

[project.urls]
Homepage = "https://sdm-schemas.lsst.io"
Source = "https://github.com/lsst/sdm_schemas"
Expand Down
28 changes: 28 additions & 0 deletions python/lsst/sdm/schemas/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file is part of sdm_schemas.
#
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("lsst-sdm-schemas")
except PackageNotFoundError:
# Package not installed or scons not run.
__version__ = "0.0.0"

0 comments on commit 2d4b2ab

Please sign in to comment.