-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python_version_interface #5
Comments
make file ideas: Define paths for virtual environmentsPY27_ENV = py27env Define the Python versionsPY27 = python2.7 Define paths for scriptsMAIN_SCRIPT = main.py Rule to create the Python 2.7 virtual environment$(PY27_ENV)/bin/activate: requirements-py27.txt Rule to create the Python 3.x virtual environment$(PY3_ENV)/bin/activate: requirements-py3.txt Rule to run the Python 2.7 scriptrun_py27: $(PY27_ENV)/bin/activate Rule to run the Python 3.x scriptrun_py3: $(PY3_ENV)/bin/activate Rule to clean up the virtual environmentsclean: Rule to run everythingall: run_py27 run_py3 |
#Example of python2.7 script main.py (Python 2.7 script)import subprocess def run_python3_script(venv_path, script_path, *args): if name == "main": |
#Example of python3 script example.py (Python 3.x script)import sys def py3_function(x): if name == "main": |
Need to be able to run python 3 code within a python 2 environment.
Propose creating a abstract python 2.7 function that calls the python 3 code as a subprocess.
Requirements:
The text was updated successfully, but these errors were encountered: