Skip to content

Commit

Permalink
fix cf test script
Browse files Browse the repository at this point in the history
  • Loading branch information
bacali95 committed Jan 4, 2020
1 parent 7432e0b commit f54a8db
Show file tree
Hide file tree
Showing 21 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion cf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import sys

from src import cf_main
from cf_submit import cf_main

if __name__ == '__main__':
try:
Expand Down
1 change: 1 addition & 0 deletions cf_submit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '1.3.1'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions src/cf_test.py → cf_submit/cf_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='cf_submit',
version='1.3.0',
version='1.3.1',
scripts=['cf'],
author='Nasreddine Bac Ali',
author_email='[email protected]',
Expand All @@ -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'
]
Expand Down
1 change: 0 additions & 1 deletion src/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions src/requirements.txt

This file was deleted.

0 comments on commit f54a8db

Please sign in to comment.