Skip to content

Commit

Permalink
better packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
gumblex committed Mar 27, 2015
1 parent 1fea65e commit 7ed37bd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include zhcdict.json
include zhconv/zhcdict.json
11 changes: 5 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import os

try:
from setuptools import setup
except ImportError:
from distutils.core import setup

setup(
name='zhconv',
version='1.1.0',
version='1.1.1',
description="A simple implementation of Chinese S-T conversion.",
author='Dingyuan Wang',
author_email='abcdoyle888@gmail.com',
py_modules=['zhconv'],
packages=['zhconv'],
include_package_data=True,
platforms='any',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand All @@ -24,6 +24,5 @@
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
],
url='https://github.com/gumblex/zhconv',
data_files=[('', ['zhcdict.json'])]
url='https://github.com/gumblex/zhconv'
)
1 change: 1 addition & 0 deletions zhconv/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .zhconv import *
5 changes: 5 additions & 0 deletions zhconv/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from .zhconv import main
main()
2 changes: 1 addition & 1 deletion zhcdict.json → zhconv/zhcdict.json
Original file line number Diff line number Diff line change
Expand Up @@ -19074,4 +19074,4 @@
"點裏": "點裡",
"鼠标": "滑鼠"
}
}
}
3 changes: 2 additions & 1 deletion zhconv.py → zhconv/zhconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ def main():
locale = sys.argv[2]
convertfunc = convert_for_mw
else:
print("usage: %s [-w] {zh-cn|zh-tw|zh-hk|zh-sg|zh-hans|zh-hant|zh} < input > output" % __file__)
thisfile = __file__ if __name__ == '__main__' else 'python -mzhconv'
print("usage: %s [-w] {zh-cn|zh-tw|zh-hk|zh-sg|zh-hans|zh-hant|zh} < input > output" % thisfile)
sys.exit(1)

loaddict()
Expand Down

0 comments on commit 7ed37bd

Please sign in to comment.