Skip to content

Commit

Permalink
Fill in version and long description from files
Browse files Browse the repository at this point in the history
Messed up the 0.1.0 release. Next time we'll do better.
  • Loading branch information
jelmervdl committed Oct 30, 2023
1 parent baf7dc4 commit 4ffe8ed
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
import re
import os
from setuptools import setup

console_scripts = """
[console_scripts]
sacremoses=sacremoses.cli:cli
"""

with open(os.path.join(os.path.dirname(__file__), 'sacremoses/__init__.py'), 'r') as fh:
match = re.search(r'''^__version__\s*=\s*(["'])(.+?)\1\s*$''', fh.read(), flags=re.MULTILINE)
assert match, "count not find __version__ in sacremoses/__init__.py"
version = match.group(2)

with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as fh:
long_description = fh.read()

setup(
name = 'sacremoses',
packages = ['sacremoses'],
version = '0.1.0',
version = version,
description = 'SacreMoses',
long_description = 'MosesTokenizer in Python',
long_description = long_description,
long_description_content_type = 'text/markdown',
author = '',
package_data={'sacremoses': ['data/perluniprops/*.txt', 'data/nonbreaking_prefixes/nonbreaking_prefix.*']},
url = 'https://github.com/hplt-project/sacremoses',
Expand All @@ -23,4 +34,4 @@
install_requires = ['regex', 'click', 'joblib', 'tqdm'],
entry_points=console_scripts,
python_requires='>=3.8',
)
)

0 comments on commit 4ffe8ed

Please sign in to comment.