Skip to content

Commit 3cdc599

Browse files
committed
VERSION as TEXT
1 parent 1ff4554 commit 3cdc599

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ include LICENSE
33
include pytest.ini
44
include .travis.yml
55
include Makefile
6+
include pyverilog/Makefile
7+
include pyverilog/VERSION
68
recursive-include tests *
79
recursive-include examples *
810
recursive-include verilogcode *

pyverilog/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.2.0

pyverilog/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
__version__ = "1.2.0"
1+
from __future__ import absolute_import
2+
from __future__ import print_function
3+
4+
import os
5+
6+
__version__ = open(os.path.join(os.path.dirname(__file__), "VERSION")).read().splitlines()[0]

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
import re
44
import os
5-
import pyverilog
65

76

87
def read(filename):
9-
return open(os.path.join(os.path.dirname(__file__), filename), encoding='utf8').read()
8+
# return open(os.path.join(os.path.dirname(__file__), filename), encoding='utf8').read()
9+
return open(os.path.join(os.path.dirname(__file__), filename)).read()
1010

1111

1212
setup(name='pyverilog',
13-
version=pyverilog.__version__,
13+
version=read('pyverilog/VERSION'),
1414
description='Python-based Hardware Design Processing Toolkit for Verilog HDL: Parser, Dataflow Analyzer, Controlflow Analyzer and Code Generator',
1515
long_description=read('README.md'),
1616
long_description_content_type="text/markdown",
@@ -19,7 +19,8 @@ def read(filename):
1919
license="Apache License 2.0",
2020
url='https://github.com/PyHDI/Pyverilog',
2121
packages=find_packages(),
22-
package_data={'pyverilog.ast_code_generator': ['template/*'], },
22+
package_data={'pyverilog': ['VERSION'],
23+
'pyverilog.ast_code_generator': ['template/*'], },
2324
install_requires=['Jinja2>=2.10'],
2425
extras_require={
2526
'test': ['pytest>=3.8.1', 'pytest-pythonpath>=0.7.3'],

0 commit comments

Comments
 (0)