Skip to content

Commit b569b04

Browse files
committed
openflow: changed the strategy about the version of openflow
1 parent b927c0a commit b569b04

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

openflow/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""Openflow"""
22

3-
__version__ = '0.1.0'
3+
import os
4+
5+
with open(os.path.join(os.path.dirname(__file__), 'version'), 'r') as fh:
6+
__version__ = fh.read()
47

58
from openflow.openflow import Openflow
69
from openflow.configure import ConfigureTools

openflow/version

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

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
from setuptools import setup, find_packages
22

3-
import openflow
3+
with open('openflow/version', 'r') as fh:
4+
version = fh.read()
45

56
with open('README.md', 'r') as fh:
67
long_description = fh.read()
78

89
setup(
910
name='fpgaopenflow',
10-
version=openflow.__version__,
11+
version=version,
1112
description='a Python library, and CLI utilities, which solves HDL-to-bitstream based on FOSS',
1213
long_description=long_description,
1314
long_description_content_type='text/markdown',
@@ -16,7 +17,7 @@
1617
license='GPLv3',
1718
url='https://github.com/PyFPGA/openflow',
1819
packages=find_packages(),
19-
package_data={'': ['configure.yml']},
20+
package_data={'': ['version', 'configure.yml']},
2021
entry_points={
2122
'console_scripts': [
2223
'openflow_syn = openflow.helpers.synthesis:main',

0 commit comments

Comments
 (0)