Skip to content

Commit

Permalink
fix version
Browse files Browse the repository at this point in the history
  • Loading branch information
theblackcat102 committed Apr 12, 2022
1 parent 4d81153 commit 7783955
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion extractnet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from extractnet.blocks import Blockifier, PartialBlock, BlockifyError
from extractnet import features
from extractnet.pipeline import Extractor
from extractnet.settings import __version__

__version__ = '2.0.0'


_LOADED_MODELS = {}

Expand Down
1 change: 0 additions & 1 deletion extractnet/settings.py

This file was deleted.

7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# have to import `Extension` after `setuptools.setup`
from distutils.extension import Extension
import sys
from extractnet.settings import __version__
import re, io
from Cython.Distutils import build_ext
from Cython.Build import cythonize
import lxml
Expand Down Expand Up @@ -76,6 +76,11 @@ def find_libxml2_include():
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

__version__ = re.search(
r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', # It excludes inline comment too
io.open('main_package/__init__.py', encoding='utf_8_sig').read()
).group(1)

setup(
name='extractnet',
version=__version__,
Expand Down

0 comments on commit 7783955

Please sign in to comment.