# yes''', '''no yes no''', ] AVAILABLE_PYTHONS = [] for min_version in ('2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4'): popen = subprocess.Popen('which python' + min_version, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = popen.communicate() if stdout: AVAILABLE_PYTHONS.append(min_version) if __name__ == '__main__': log_config = CONSOLE dict_config(log_config) for prefix in STDIN_PREFIXES: for min_version in PY_VERSIONS: for plugins in PLUGIN_VERSIONS: for trans in ('yes', 'no'): data = prefix + "\n" + min_version + "\n" + trans + "\n0.1\n" + plugins + "\n" print(data) for run_version in AVAILABLE_PYTHONS: print('Running StarterPyth with ' + run_version) if os.path.isdir(TEST_DIRECTORY): shutil.rmtree(TEST_DIRECTORY) cmd = "python{0} -c 'from starterpyth.core import main; main()'".format(run_version) popen = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) stdout, stderr = popen.communicate(py3k_bytes(data))
# yes''', '''no yes no''', ] AVAILABLE_PYTHONS = [] for min_version in ('2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4'): popen = subprocess.Popen('which python' + min_version, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = popen.communicate() if stdout: AVAILABLE_PYTHONS.append(min_version) if __name__ == '__main__': log_config = CONSOLE dict_config(log_config) for prefix in STDIN_PREFIXES: for min_version in PY_VERSIONS: for plugins in PLUGIN_VERSIONS: for trans in ('yes', 'no'): data = prefix + "\n" + min_version + "\n" + trans + "\n0.1\n" + plugins + "\n" print(data.decode('utf-8')) for run_version in AVAILABLE_PYTHONS: print('Running StarterPyth with ' + run_version) if os.path.isdir(TEST_DIRECTORY): shutil.rmtree(TEST_DIRECTORY) cmd = "python{0} -c 'from starterpyth.core import main; main()'".format(run_version) popen = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) stdout, stderr = popen.communicate(data)
import codecs import os.path import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages from starterpyth.log import CONSOLE, dict_config __author__ = 'd9pouces' dict_config(CONSOLE) readme = os.path.join(os.path.dirname(__file__), 'README.rst') if os.path.isfile(readme): fd = codecs.open(readme, 'r', encoding='utf-8') long_description = fd.read() fd.close() else: long_description = '' version_filename = os.path.join(os.path.dirname(__file__), 'VERSION') fd = open(version_filename, 'r') version = fd.read() fd.close() setup( name='starterpyth', version=version, description='Generate good skeletons of Python applications.', long_description=long_description,
import codecs import logging import os.path from setuptools import setup, find_packages from starterpyth.log import CONSOLE, dict_config __author__ = 'd9pouces' dict_config(CONSOLE) # noinspection PyUnresolvedReferences if os.path.isdir(os.path.join(os.path.dirname(__file__), '.git')): try: import setuptools_git except ImportError: setuptools_git = None logging.warning( 'You should install setuptools-git to track data files.') readme = os.path.join(os.path.dirname(__file__), 'README.md') if os.path.isfile(readme): fd = codecs.open(readme, 'r', encoding='utf-8') long_description = fd.read() fd.close() else: long_description = '' setup( name='starterpyth',