Skip to content
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

Remove references to Python 2 in preparation for the release of Root 6.32 #519

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )

if(LLVM_INCLUDE_TESTS)
set(Python_ADDITIONAL_VERSIONS 2.7)
set(Python_ADDITIONAL_VERSIONS 3)
include(FindPythonInterp)
if(NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR
Expand All @@ -116,8 +116,8 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
endif()

if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 )
message(FATAL_ERROR "Python 2.7 or newer is required")
if( ${PYTHON_VERSION_STRING} VERSION_LESS 3 )
message(FATAL_ERROR "Python 3 or newer is required")
endif()

# Check prebuilt llvm/utils.
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

from __future__ import absolute_import, division, print_function
import sys, os
from datetime import date

Expand Down
3 changes: 1 addition & 2 deletions docs/tools/in2pod.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# A tool to parse cling.pod.in and generate cling.pod dynamically

from __future__ import print_function
import subprocess
import sys
import os
Expand Down
8 changes: 1 addition & 7 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ from lit.llvm import llvm_config

# Configuration file for the 'lit' test runner.

if sys.version_info < (3, 0):
# Python 2.x
from urllib2 import urlopen
input = raw_input
else:
# Python 3.x
from urllib.request import urlopen
from urllib.request import urlopen

IsWindows = platform.system() == 'Windows'

Expand Down
3 changes: 1 addition & 2 deletions tools/Jupyter/kernel/clingkernel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#------------------------------------------------------------------------------
# CLING - the C++ LLVM-based InterpreterG :)
# author: Min RK
Expand All @@ -15,7 +15,6 @@
Talks to Cling via ctypes
"""

from __future__ import print_function

__version__ = '0.0.3'

Expand Down
4 changes: 2 additions & 2 deletions tools/Jupyter/kernel/scripts/jupyter-cling-kernel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from clingkernel import main
main()
main()
8 changes: 3 additions & 5 deletions tools/Jupyter/kernel/setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# coding: utf-8

#------------------------------------------------------------------------------
Expand All @@ -11,7 +11,6 @@
# LICENSE.TXT for details.
#------------------------------------------------------------------------------

from __future__ import print_function

# the name of the project
name = 'clingkernel'
Expand All @@ -23,12 +22,11 @@
import sys

v = sys.version_info
if v[:2] < (2,7) or (v[0] >= 3 and v[:2] < (3,3)):
error = "ERROR: %s requires Python version 2.7 or 3.3 or above." % name
if v[0] >= 3 and v[:2] < (3,3):
error = "ERROR: %s requires Python version 3.3 or above." % name
print(error, file=sys.stderr)
sys.exit(1)

PY3 = (sys.version_info[0] >= 3)

#-----------------------------------------------------------------------------
# get on with it
Expand Down
8 changes: 2 additions & 6 deletions tools/packaging/cpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@


import sys

if sys.version_info < (3, 0):
raise Exception("cpt needs Python 3")

import argparse
import copy
import os
Expand Down Expand Up @@ -100,7 +96,7 @@ def travis_fold_end(tag):

def box_draw_header():
msg = 'cling (' + platform.machine() + ')' \
+ formatdate(time.time(), tzinfo())
+ formatdate(time.time(), tzinfo())
spaces_no = 80 - len(msg) - 4
spacer = ' ' * spaces_no
msg = 'cling (' + platform.machine() + ')' \
Expand Down Expand Up @@ -1842,7 +1838,7 @@ def make_dmg(CPT_SRC_DIR):

parser = argparse.ArgumentParser(description='Cling Packaging Tool')
parser.add_argument('--last-stable-build', help='Build the last stable snapshot in one of these formats: tar | deb | nsis | rpm | dmg | pkg')
parser.add_argument('--current-dev-build',
parser.add_argument('--current-dev-build',
help=('--current-dev:<tar | deb | nsis | rpm | dmg | pkg> will build the latest development snapshot in the given format'
+ '\n--current-dev:branch:<branch> will build <branch> on llvm, clang, and cling'
+ '\n--current-dev:branches:<a,b,c> will build branch <a> on llvm, <b> on clang, and <c> on cling'))
Expand Down