Permalink
Browse files

Use wrapper `cdiff` instead of symlink for future unit test; doc update

  • Loading branch information...
1 parent 3b26195 commit 329760c5c83ca0016490f371575c644ba46ac8a4 @ymattw committed Feb 16, 2013
Showing with 31 additions and 17 deletions.
  1. +0 −1 .gitignore
  2. +5 −0 CHANGES
  3. +0 −1 MANIFEST.in
  4. +1 −1 Makefile
  5. +3 −3 README.rst
  6. +12 −0 cdiff
  7. +2 −3 cdiff.py
  8. +7 −7 setup.py
  9. +1 −1 tests/regression.sh
View
@@ -1,7 +1,6 @@
*.pyc
*~
/MANIFEST
-/cdiff
/build/
/cdiff.egg-info/
/dist/
View
@@ -2,6 +2,11 @@
Change log
==========
+Version 0.4 (2013-02-16)
+
+ - New option *-c WHEN* (*--color WHEN*) to support auto test
+ - Auto regression test now on Travis
+
Version 0.3 (2013-02-07)
- Support compare two files (wrapper of diff)
View
@@ -4,4 +4,3 @@ include Makefile
include README.rst
include tests/*
include tests/*/*
-exclude cdiff
View
@@ -13,7 +13,7 @@ test:
tests/regression.sh
clean:
- rm -f cdiff MANIFEST
+ rm -f MANIFEST
rm -rf build/ cdiff.egg-info/ dist/ __pycache__/
build:
View
@@ -29,7 +29,7 @@ install with ``pip`` if you have the tool.
.. code:: sh
- sudo pip install cdiff
+ pip install --upgrade cdiff
Install with setup.py
~~~~~~~~~~~~~~~~~~~~~
@@ -40,7 +40,7 @@ You can also run the setup.py from the source if you don't have ``pip``.
git clone https://github.com/ymattw/cdiff.git
cd cdiff
- sudo ./setup.py install
+ ./setup.py install
Download directly
~~~~~~~~~~~~~~~~~
@@ -102,7 +102,7 @@ Redirect output to another patch file is safe:
.. code:: sh
- svn diff | cdiff -s > my.patch
+ svn diff -r PREV | cdiff -s > my.patch
Notes
-----
View
12 cdiff
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import sys
+import cdiff
+
+try:
+ sys.exit(cdiff.main())
+except:
+ sys.exit(1)
+
+# vim:set et sts=4 sw=4 tw=80:
View
@@ -8,7 +8,7 @@
"""
META_INFO = {
- 'version' : '0.3',
+ 'version' : '0.4',
'license' : 'BSD-3',
'author' : 'Matthew Wang',
'email' : 'mattwyl(@)gmail(.)com',
@@ -22,8 +22,7 @@
import sys
if sys.hexversion < 0x02050000:
- sys.stderr.write("*** Requires python >= 2.5.0\n")
- sys.exit(1)
+ raise SystemExit("*** Requires python >= 2.5.0")
IS_PY3 = sys.hexversion >= 0x03000000
import os
View
@@ -1,15 +1,14 @@
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
from __future__ import with_statement
from distutils.core import setup
import os
from cdiff import META_INFO as _meta
-# Create symlink so that to use 'scripts' w/o '.py'
-link_name = 'cdiff'
-if os.path.exists(link_name):
- os.unlink(link_name)
-os.symlink('cdiff.py', link_name)
+import sys
+if sys.hexversion < 0x02050000:
+ raise SystemExit("*** Requires python >= 2.5.0")
with open('README.rst') as doc:
long_description = doc.read()
@@ -37,7 +36,8 @@
'Operating System :: Unix',
'Programming Language :: Python',
],
- packages = [],
py_modules = ['cdiff'],
- scripts = [link_name],
+ scripts = ['cdiff'],
)
+
+# vim:set et sts=4 sw=4 tw=80:
View
@@ -3,7 +3,7 @@
set -o errexit
SELF_DIR=$(cd $(dirname $0) && pwd) || exit 1
-CDIFF=$SELF_DIR/../cdiff.py
+CDIFF=$SELF_DIR/../cdiff
function pass()
{

0 comments on commit 329760c

Please sign in to comment.