Skip to content

Commit 38e590e

Browse files
authored
Fix printing of version in the generated configure/build/install scripts (#37)
1 parent 468b73c commit 38e590e

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

ecbundle/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@
1616
from ecbundle.populate import * # noqa
1717
from ecbundle.project import * # noqa
1818
from ecbundle.util import * # noqa
19-
20-
__version__ = "2.3.0"
19+
from ecbundle.version import __version__ # noqa

ecbundle/build.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from .bundle import Bundle
1818
from .logging import colors, error, header, success
1919
from .util import Timer, fullpath, mkdir_p, symlink_force
20+
from .version import __version__
2021

2122
__all__ = ["BundleBuilder"]
2223

@@ -547,6 +548,7 @@ def create_scripts(self):
547548
env.write("# Empty environment\n")
548549

549550
mappings = dict(
551+
ecbundle_version=__version__,
550552
bundle_name=self.bundle().name(),
551553
src_dir=src_dir,
552554
install_dir=install_dir,

ecbundle/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "2.3.0"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def read(fname):
3030

3131

3232
version = None
33-
for line in read("ecbundle/__init__.py").split("\n"):
33+
for line in read("ecbundle/version.py").split("\n"):
3434
if line.startswith("__version__"):
3535
version = line.split("=")[-1].strip()[1:-1]
3636

0 commit comments

Comments
 (0)