Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Configured to use autopep8 as a module in order to work with venvs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sorin Sbarnea committed Jun 28, 2016
1 parent 37b88c3 commit 73bb2c7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import logging
import os
import runpy
import sys
import subprocess
import warnings
Expand Down Expand Up @@ -67,9 +68,10 @@ def finalize_options(self):
def run_tests(self):
# before running tests we need to run autopep8
try:
subprocess.check_call(
"python -m autopep8 -r --in-place jira/ tests/ examples/",
shell=True)
saved_argv = sys.argv
sys.argv = "-r --in-place jira/ tests/ examples/".split(" ")
runpy.run_module('autopep8')
sys.argv = saved_argv # restore sys.argv
except subprocess.CalledProcessError:
logging.warning('autopep8 is not installed so '
'it will not be run')
Expand Down Expand Up @@ -180,10 +182,8 @@ def run(self):
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python',
Expand Down

0 comments on commit 73bb2c7

Please sign in to comment.