diff --git a/examples/developer_guide/3_simple_cpp_stage/.gitattributes b/examples/developer_guide/3_simple_cpp_stage/.gitattributes index 26e3729785..6402a165ec 100644 --- a/examples/developer_guide/3_simple_cpp_stage/.gitattributes +++ b/examples/developer_guide/3_simple_cpp_stage/.gitattributes @@ -1 +1 @@ -src/_version.py export-subst +src/simple_cpp_stage/_version.py export-subst diff --git a/examples/developer_guide/3_simple_cpp_stage/MANIFEST.in b/examples/developer_guide/3_simple_cpp_stage/MANIFEST.in index 60ea82abec..6f3094ee52 100644 --- a/examples/developer_guide/3_simple_cpp_stage/MANIFEST.in +++ b/examples/developer_guide/3_simple_cpp_stage/MANIFEST.in @@ -1,3 +1,2 @@ -include versioneer.py -include src/_version.py +include src/simple_cpp_stage/_version.py recursive-include src *.so *.pyi diff --git a/examples/developer_guide/3_simple_cpp_stage/pyproject.toml b/examples/developer_guide/3_simple_cpp_stage/pyproject.toml index bb98815424..ce61fea657 100644 --- a/examples/developer_guide/3_simple_cpp_stage/pyproject.toml +++ b/examples/developer_guide/3_simple_cpp_stage/pyproject.toml @@ -24,8 +24,8 @@ requires = ["setuptools", "wheel", "versioneer[toml]==0.29"] VCS = "git" style = "pep440" tag_prefix = "v" -versionfile_build = "src/_version.py" -versionfile_source = "src/_version.py" +versionfile_build = "src/simple_cpp_stage/_version.py" +versionfile_source = "src/simple_cpp_stage/_version.py" [tool.yapfignore] ignore_patterns = [ diff --git a/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/__init__.py b/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/__init__.py index e69de29bb2..9614ddb8cd 100644 --- a/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/__init__.py +++ b/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/__init__.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from . import _version # pylint: disable=wrong-import-position + +__version__ = _version.get_versions()['version'] diff --git a/examples/developer_guide/3_simple_cpp_stage/src/_version.py b/examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/_version.py similarity index 100% rename from examples/developer_guide/3_simple_cpp_stage/src/_version.py rename to examples/developer_guide/3_simple_cpp_stage/src/simple_cpp_stage/_version.py