diff --git a/cf b/cf index 1062baf..2a6b811 100755 --- a/cf +++ b/cf @@ -2,7 +2,7 @@ import sys -from src import cf_main +from cf_submit import cf_main if __name__ == '__main__': try: diff --git a/cf_submit/__init__.py b/cf_submit/__init__.py new file mode 100644 index 0000000..72837bd --- /dev/null +++ b/cf_submit/__init__.py @@ -0,0 +1 @@ +__version__ = '1.3.1' diff --git a/src/bash_completion/cf b/cf_submit/bash_completion/cf similarity index 100% rename from src/bash_completion/cf rename to cf_submit/bash_completion/cf diff --git a/src/bin/cf_checker b/cf_submit/bin/cf_checker similarity index 100% rename from src/bin/cf_checker rename to cf_submit/bin/cf_checker diff --git a/src/cf_colors.py b/cf_submit/cf_colors.py similarity index 100% rename from src/cf_colors.py rename to cf_submit/cf_colors.py diff --git a/src/cf_contests.py b/cf_submit/cf_contests.py similarity index 100% rename from src/cf_contests.py rename to cf_submit/cf_contests.py diff --git a/src/cf_groups.py b/cf_submit/cf_groups.py similarity index 100% rename from src/cf_groups.py rename to cf_submit/cf_groups.py diff --git a/src/cf_gyms.py b/cf_submit/cf_gyms.py similarity index 100% rename from src/cf_gyms.py rename to cf_submit/cf_gyms.py diff --git a/src/cf_hack.py b/cf_submit/cf_hack.py similarity index 100% rename from src/cf_hack.py rename to cf_submit/cf_hack.py diff --git a/src/cf_login.py b/cf_submit/cf_login.py similarity index 100% rename from src/cf_login.py rename to cf_submit/cf_login.py diff --git a/src/cf_main.py b/cf_submit/cf_main.py similarity index 100% rename from src/cf_main.py rename to cf_submit/cf_main.py diff --git a/src/cf_parse.py b/cf_submit/cf_parse.py similarity index 100% rename from src/cf_parse.py rename to cf_submit/cf_parse.py diff --git a/src/cf_problems.py b/cf_submit/cf_problems.py similarity index 100% rename from src/cf_problems.py rename to cf_submit/cf_problems.py diff --git a/src/cf_standings.py b/cf_submit/cf_standings.py similarity index 100% rename from src/cf_standings.py rename to cf_submit/cf_standings.py diff --git a/src/cf_submit.py b/cf_submit/cf_submit.py similarity index 100% rename from src/cf_submit.py rename to cf_submit/cf_submit.py diff --git a/src/cf_test.py b/cf_submit/cf_test.py similarity index 86% rename from src/cf_test.py rename to cf_submit/cf_test.py index 6065a86..dced088 100644 --- a/src/cf_test.py +++ b/cf_submit/cf_test.py @@ -50,13 +50,13 @@ def execute(source, lang, executable, input_file, output_file): if lang == 'cpp' or lang == 'c': cmd = './%s' % executable elif lang == 'java': - cmd = ['java', '-DLOCAL', executable] + cmd = 'java -DLOCAL %s' % executable elif lang == 'kt': - cmd = ['java', '-DLOCAL', '-jar', executable + '.jar'] + cmd = 'java -DLOCAL -jar %s.jar' % executable elif lang == 'py2': - cmd = ['python2', source] + cmd = 'python2 %s ' % source elif lang == 'py3': - cmd = ['python3', source] + cmd = 'python3 %s ' % source else: print('Sorry language not supported!') return exit(-1) @@ -65,13 +65,13 @@ def execute(source, lang, executable, input_file, output_file): def comp(source, lang, executable): if lang == 'cpp': - cmd = ['g++', source, '-DLOCAL', '-O2', '-o', executable] + cmd = 'g++ %s -DLOCAL -O2 -o %s' % (source, executable) elif lang == 'c': - cmd = ['gcc', source, '-DLOCAL', '-O2', '-o', executable] + cmd = 'gcc %s -DLOCAL -O2 -o %s' % (source, executable) elif lang == 'java': - cmd = ['javac', source] + cmd = 'javac %s' % source elif lang == 'kt': - cmd = ['kotlinc', source, '-include-runtime', '-d', executable] + cmd = 'javac %s -include-runtime -d %s' % (source, executable) else: cmd = [] Popen(cmd, shell=True).wait() diff --git a/src/cf_utils.py b/cf_submit/cf_utils.py similarity index 100% rename from src/cf_utils.py rename to cf_submit/cf_utils.py diff --git a/src/codeforces.py b/cf_submit/codeforces.py similarity index 100% rename from src/codeforces.py rename to cf_submit/codeforces.py diff --git a/setup.py b/setup.py index 9831462..06f61c5 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='cf_submit', - version='1.3.0', + version='1.3.1', scripts=['cf'], author='Nasreddine Bac Ali', author_email='nasreddine.bacali95@gmail.com', @@ -15,7 +15,7 @@ url='https://github.com/bacali95/cf_submit', packages=find_packages(), package_data={ - 'src': [ + 'cf_submit': [ 'bin/cf_checker', 'bash_completion/cf' ] diff --git a/src/__init__.py b/src/__init__.py deleted file mode 100644 index 19b4f1d..0000000 --- a/src/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = '1.3.0' diff --git a/src/requirements.txt b/src/requirements.txt deleted file mode 100644 index 62ac31f..0000000 --- a/src/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -lxml -robobrowser -prettytable -javalang