-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from pgolo/dev
sic-1.0.4
- Loading branch information
Showing
22 changed files
with
254 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
build/* | ||
cythonized/* | ||
dist/* | ||
!dist/*.whl | ||
!dist/*.tar.gz | ||
*.spec | ||
sic.egg-info/* | ||
sic/core.c | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
include README.md | ||
include LICENSE | ||
include sic/core.c | ||
include sic/tokenizer.greek.xml | ||
include sic/tokenizer.standard.xml | ||
include sic/tokenizer.western.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Usage: | ||
# buildtargz.sh path/to/python | ||
# | ||
# The package will be placed in dist/ directory. | ||
|
||
RUNDIR=`pwd` | ||
cd `dirname $0` | ||
MYDIR=`pwd` | ||
ROOT=${MYDIR}/../.. | ||
REQUIREMENTS=${ROOT}/requirements.txt | ||
ENV=${ROOT}/.env.build | ||
SHIPPING=${ROOT}/shipping | ||
|
||
if [ $# -eq 0 ] | ||
then | ||
cd ${RUNDIR} | ||
exit | ||
fi | ||
|
||
if [ ! -f $1 ] | ||
then | ||
echo $1: Python not found | ||
cd ${RUNDIR} | ||
exit | ||
fi | ||
|
||
cd ${ROOT} | ||
|
||
virtualenv -p $1 ${ENV} | ||
${ENV}/bin/python3 ${SHIPPING}/make_setup.py sdist | ||
${ENV}/bin/python3 ${ROOT}/setup.py sdist | ||
|
||
rm ${ROOT}/setup.py | ||
|
||
cd ${RUNDIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Usage: | ||
# buildwheel.sh path/to/python3.6 path/to/python3.7 path/to/python3.8 | ||
# | ||
# The wheels will be placed in dist/ directory. | ||
|
||
RUNDIR=`pwd` | ||
cd `dirname $0` | ||
MYDIR=`pwd` | ||
ROOT=${MYDIR}/../.. | ||
REQUIREMENTS=${ROOT}/requirements.txt | ||
ENV=${ROOT}/.env.build | ||
SHIPPING=${ROOT}/shipping | ||
|
||
cd ${ROOT} | ||
|
||
for PY in "$@" | ||
do | ||
if [ ! -f ${PY} ] | ||
then | ||
echo ${PY}: Python not found | ||
else | ||
virtualenv -p ${PY} ${ENV} | ||
${ENV}/bin/python3 -m pip install --no-cache-dir -r ${REQUIREMENTS} | ||
${ENV}/bin/python3 ${SHIPPING}/make_setup.py bdist_wheel | ||
${ENV}/bin/python3 ${ROOT}/setup.py bdist_wheel | ||
rm -r ${ENV} | ||
rm -r ${ROOT}/sic.egg-info | ||
rm -r ${ROOT}/build | ||
rm ${ROOT}/sic/core.c | ||
rm ${ROOT}/setup.py | ||
fi | ||
done | ||
|
||
cd ${RUNDIR} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@echo off | ||
rem Usage: | ||
rem buildtargz.bat path\to\python | ||
rem | ||
rem The package will be placed in dist\ directory. | ||
|
||
set RUNDIR=%cd% | ||
set MYDIR=%~dp0 | ||
set ROOT=%MYDIR%\..\.. | ||
set ENV=%ROOT%\.env.build | ||
set SHIPPING=%ROOT%\shipping | ||
|
||
if (%1)==() (cd %RUNDIR% && exit) | ||
if not exist "%1" (echo "%1": Python not found && cd %RUNDIR% && exit) | ||
cd "%ROOT%" | ||
virtualenv -p "%1" "%ENV%" | ||
"%ENV%"\Scripts\python "%SHIPPING%"\make_setup.py sdist | ||
"%ENV%"\Scripts\python "%ROOT%"\setup.py sdist | ||
rmdir /S /Q "%ENV%" | ||
|
||
del /Q "%ROOT%"\setup.py | ||
|
||
cd %RUNDIR% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@echo off | ||
rem Usage: | ||
rem buildwheel.bat path\to\python36 path\to\python37 path\to\python38 | ||
rem | ||
rem The package will be placed in dist\ directory. | ||
|
||
set RUNDIR=%cd% | ||
set MYDIR=%~dp0 | ||
set ROOT=%MYDIR%\..\.. | ||
set REQUIREMENTS=%ROOT%\requirements.txt | ||
set ENV=%ROOT%\.env.build | ||
set SHIPPING=%ROOT%\shipping | ||
|
||
:BUILD | ||
if (%1)==() (goto FINISH) | ||
if not exist "%1" (echo "%1": Python not found && shift && goto BUILD) | ||
cd "%ROOT%" | ||
virtualenv -p "%1" "%ENV%" | ||
"%ENV%"\Scripts\python -m pip install --no-cache-dir -r "%REQUIREMENTS%" | ||
"%ENV%"\Scripts\python "%SHIPPING%"\make_setup.py bdist_wheel | ||
"%ENV%"\Scripts\python "%ROOT%"\setup.py bdist_wheel | ||
rmdir /S /Q "%ENV%" | ||
rmdir /S /Q "%ROOT%"\sic.egg-info | ||
rmdir /S /Q "%ROOT%"\build | ||
del /Q "%ROOT%"\sic\core.c | ||
shift | ||
goto BUILD | ||
|
||
:FINISH | ||
del /Q "%ROOT%"\setup.py | ||
cd %RUNDIR% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
try: | ||
from Cython.Build import cythonize | ||
ext_modules = cythonize(['sic/core.py'], compiler_directives={'language_level': '3'}) | ||
except: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import sys | ||
|
||
def just_do_it(option): | ||
cythonize = '' | ||
if option in ['bdist_wheel']: | ||
with open('shipping/cythonize.py', mode='r', encoding='utf8') as f: | ||
cythonize = f.read() | ||
with open('shipping/setup.py', mode='r', encoding='utf8') as i, open('./setup.py', mode='w', encoding='utf8') as o: | ||
for line in i: | ||
if line.strip() != '# sic: cythonize?': | ||
o.write(line) | ||
else: | ||
o.write(cythonize) | ||
|
||
if __name__ == '__main__': | ||
just_do_it(sys.argv[1] if len(sys.argv) > 1 else '') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import sys | ||
from setuptools import setup | ||
|
||
ext_modules = None | ||
with open('README.md', mode='r', encoding='utf8') as f: | ||
long_description = f.read() | ||
|
||
# sic: cythonize? | ||
|
||
setup( | ||
name='sic', | ||
version='1.0.4', | ||
description='Utility for string normalization', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
url='https://github.com/pgolo/sic', | ||
author='Pavel Golovatenko-Abramov', | ||
author_email='[email protected]', | ||
packages=['sic'], | ||
ext_modules=ext_modules, | ||
include_package_data=True, | ||
license='MIT', | ||
platforms=['any'], | ||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
'Topic :: Text Processing :: Linguistic', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: OS Independent', | ||
], | ||
python_requires='>=3.6' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.