Skip to content

Commit

Permalink
Reinstate py2.7 support for patch release (before completely dropping…
Browse files Browse the repository at this point in the history
… py2)
  • Loading branch information
manodeep committed Aug 6, 2024
1 parent 5ab6dd6 commit 141b134
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
16 changes: 8 additions & 8 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ ifeq ($(DO_CHECKS), 1)
endif

# Check if using clang on Apple with M1/M1 Max/M2 etc
# if so, remove -march=native from CFLAGS and
# if so, remove -march=native from CFLAGS and
# then add -mcpu=apple-m1 -mtune=apple-m1
# ARCH := $(shell uname -m)
# $(info ARCH is $(ARCH))
Expand All @@ -400,12 +400,12 @@ ifeq ($(DO_CHECKS), 1)
#### MS: 3rd May 2023
### For reasons unknown to me, the addition to CFLAGS does not work correctly if I
### change this variable name "opt" to match the remaining names of "copt". Works fine
### for 'clang' on OSX but not for 'gcc'. Adds the -march=native but somehow that
### for 'clang' on OSX but not for 'gcc'. Adds the -march=native but somehow that
### extra flag is removed when testing the -mcpu/-mtune compiler options. For the sake
### of my sanity, I have accepted that this is how it shall work! Hopefully, in the future,
### someone will figure out/explain *why* this behaviour is expected. It
### seems more like a gcc bug to me where gcc is updating CFLAGS based on
### the options on the last compile call (since cland does not show
### someone will figure out/explain *why* this behaviour is expected. It
### seems more like a gcc bug to me where gcc is updating CFLAGS based on
### the options on the last compile call (since cland does not show
### this behaviour) - MS: 3rd May, 2023

## TLDR: Leave this variable as "opt" while the remaining are set to "copt". Otherwise,
Expand All @@ -424,7 +424,7 @@ ifeq ($(DO_CHECKS), 1)
CFLAGS += $(copt)
else
CFLAGS := $(filter-out $(copt), $(CFLAGS))
endif
endif

copt := -mtune=apple-m1
COMPILE_OPT_SUPPORTED := $(shell $(CC) $(copt) -dM -E - < /dev/null 2>&1 1>/dev/null)
Expand Down Expand Up @@ -474,8 +474,8 @@ ifeq ($(DO_CHECKS), 1)

### Check for minimum python + numpy versions. In theory, I should also check
### that *any* python and numpy are available but that seems too much effort
MIN_PYTHON_MAJOR := 3
MIN_PYTHON_MINOR := 9
MIN_PYTHON_MAJOR := 2
MIN_PYTHON_MINOR := 7

MIN_NUMPY_MAJOR := 1
MIN_NUMPY_MINOR := 20
Expand Down
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,11 +522,13 @@ def setup_packages():
'Operating System :: POSIX',
'Programming Language :: C',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12']
'Programming Language :: Python :: 3.10']
metadata = dict(
name=projectname,
version=version,
Expand Down Expand Up @@ -558,8 +560,7 @@ def setup_packages():
min_np_minor),
'future',
'wurlitzer'],
python_requires='!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*,'\
'!=3.5.*, !=3.6.*, !=3.7.*, !=3.8.*, <4',
python_requires='>=2.7,!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, <4',
zip_safe=False,
cmdclass={'build_ext': BuildExtSubclass})

Expand Down

0 comments on commit 141b134

Please sign in to comment.