Skip to content

Commit

Permalink
Support Python 3.4 (#3)
Browse files Browse the repository at this point in the history
* Update subprocess32

* Drop subprocess32
  • Loading branch information
eight04 committed Jun 14, 2018
1 parent bcab0d9 commit b4b061a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
script:
- pip install -e .
- python cute.py test
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ pylint>=1.8.4,<2
sphinx-autobuild>=0.7.1,<0.8
Sphinx>=1.6.5,<2
livereload>=2.5.2,<3
-e .
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ classifiers =
License :: OSI Approved :: MIT License
Natural Language :: Chinese (Traditional)
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Software Development :: Build Tools
Expand All @@ -32,7 +34,6 @@ install_requires =
send2trash >= 1.3.0, < 2
natsort >= 5.0.2, < 6
pathlib2 >= 2.3.2, < 3; python_version < "3.5"
subprocess32 == 3.5.0rc3; python_version < "3.5"

[options.entry_points]
console_scripts =
Expand Down
7 changes: 2 additions & 5 deletions xcute/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
import pathlib
import sys
import shlex
try:
import subprocess32 as subprocess
except ImportError:
import subprocess
import subprocess
import traceback

__version__ = "0.5.1"
Expand Down Expand Up @@ -141,7 +138,7 @@ def __call__(self, *args):
for cmd in self.cmds:
args = shlex.split(f(cmd)) + list(args)
log("> Cmd: {}".format(" ".join(args)))
subprocess.run(subprocess.list2cmdline(args), shell=True, check=True)
subprocess.check_call(subprocess.list2cmdline(args), shell=True)

class Bump:
"""An executor which can bump the version inside a .py file."""
Expand Down

0 comments on commit b4b061a

Please sign in to comment.