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

3.7 Compatibility #80

Closed
nugend opened this issue Jul 18, 2018 · 8 comments
Closed

3.7 Compatibility #80

nugend opened this issue Jul 18, 2018 · 8 comments
Assignees
Labels
Milestone

Comments

@nugend
Copy link

nugend commented Jul 18, 2018

Is there anything besides the removal of install_misc blocking this?

@abalkin
Copy link
Contributor

abalkin commented Jul 18, 2018

No. I've already fixed setup.py internally by simply copying install_misc from Python 3.6. In the next release, 3.7 will be officially supported.

@nugend
Copy link
Author

nugend commented Oct 19, 2018

@abalkin Can you please provide a point release to the current version to resolve this? It's been 3 months and there's been no apparent movement towards the release of 4.2.0

@sitsang
Copy link

sitsang commented Nov 27, 2018

Please just replace the line in setup.py

from
from distutils.cmd import install_misc
to
from distutils.command.install_data import install_data as install_misc

and it will compile and build under python 3.7

@ppatel26
Copy link

ppatel26 commented Jan 28, 2019

After replacing, it gives another error

(py3_q)  ~  pip install ~/pyq-master
Processing ./pyq-master
Building wheels for collected packages: pyq
 Running setup.py bdist_wheel for pyq ... error
 Complete output from command /Users/parvpatel/miniconda3/envs/py3_q/bin/python -u -c "import setuptools,` `tokenize;__file__='/private/var/folders/xd/rlvz74x150l_j9y42kzv3sfc0000gn/T/pip-req-build-t_6skbt_/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/xd/rlvz74x150l_j9y42kzv3sfc0000gn/T/pip-wheel-fcgwgncr --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.7-x86_64-3.7
  creating build/lib.macosx-10.7-x86_64-3.7/pyq
  copying src/pyq/magic.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
  copying src/pyq/conftest.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
  copying src/pyq/cmd.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
  copying src/pyq/version.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
  copying src/pyq/_n.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
  copying src/pyq/_pt_run.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
  copying src/pyq/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
  copying src/pyq/ptk.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
  creating build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_version.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_q.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_no_numpy.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_ci.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_p.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_k.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_magic.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_pypath.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_python_q.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_n.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_threads.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_memoryview.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_pyq_executable.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_com.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_numpy.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_pathlib.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  copying src/pyq/tests/test_sd.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
  running build_ext
  building 'pyq._k' extension
  creating build/temp.macosx-10.7-x86_64-3.7
  creating build/temp.macosx-10.7-x86_64-3.7/src
  creating build/temp.macosx-10.7-x86_64-3.7/src/pyq
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/parvpatel/miniconda3/envs/py3_q/include -arch x86_64 -I/Users/parvpatel/miniconda3/envs/py3_q/include -arch x86_64 -DKXVER=3 -DKXVER2=5 -I/Users/parvpatel/miniconda3/envs/py3_q/include/python3.7m -c src/pyq/_k.c -o build/temp.macosx-10.7-x86_64-3.7/src/pyq/_k.o -Wpointer-arith -Werror -fno-strict-aliasing
  src/pyq/_k.c:110:11: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      char *str = PyUnicode_AsUTF8AndSize(obj, psize);
            ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  src/pyq/_k.c:1337:17: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                  PY_SET_SN(dest[i], obj)
                  ^~~~~~~~~~~~~~~~~~~~~~~
  src/pyq/_k.c:103:19: note: expanded from macro 'PY_SET_SN'
              char *str = PyUnicode_AsUTF8AndSize(obj, &size); \
                    ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  src/pyq/_k.c:1343:13: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
              PY_SET_SN(xs, obj)
              ^~~~~~~~~~~~~~~~~~
  src/pyq/_k.c:103:19: note: expanded from macro 'PY_SET_SN'
              char *str = PyUnicode_AsUTF8AndSize(obj, &size); \
                    ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  src/pyq/_k.c:2515:13: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
              PY_SET_SN(xS[i], o)
              ^~~~~~~~~~~~~~~~~~~
  src/pyq/_k.c:103:19: note: expanded from macro 'PY_SET_SN'
              char *str = PyUnicode_AsUTF8AndSize(obj, &size); \
                    ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  src/pyq/_k.c:4031:9: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
          PY_SET_SN(s, obj);
          ^~~~~~~~~~~~~~~~~
  src/pyq/_k.c:103:19: note: expanded from macro 'PY_SET_SN'
              char *str = PyUnicode_AsUTF8AndSize(obj, &size); \
                    ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5 errors generated.
  error: command 'gcc' failed with exit status 1`

  `----------------------------------------`
 ` Failed building wheel for pyq
  Running setup.py clean for pyq
Failed to build pyq
Installing collected packages: pyq
  Running setup.py install for pyq ... error
    Complete output from command /Users/parvpatel/miniconda3/envs/py3_q/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/xd/rlvz74x150l_j9y42kzv3sfc0000gn/T/pip-req-build-t_6skbt_/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/xd/rlvz74x150l_j9y42kzv3sfc0000gn/T/pip-record-ahh3x2wt/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.7-x86_64-3.7
    creating build/lib.macosx-10.7-x86_64-3.7/pyq
    copying src/pyq/magic.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
    copying src/pyq/conftest.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
    copying src/pyq/cmd.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
    copying src/pyq/version.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
    copying src/pyq/_n.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
    copying src/pyq/_pt_run.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
    copying src/pyq/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
    copying src/pyq/ptk.py -> build/lib.macosx-10.7-x86_64-3.7/pyq
    creating build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_version.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_q.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_no_numpy.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_ci.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_p.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_k.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_magic.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_pypath.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_python_q.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_n.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_threads.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_memoryview.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_pyq_executable.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_com.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_numpy.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_pathlib.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    copying src/pyq/tests/test_sd.py -> build/lib.macosx-10.7-x86_64-3.7/pyq/tests
    running build_ext
    building 'pyq._k' extension
    creating build/temp.macosx-10.7-x86_64-3.7
    creating build/temp.macosx-10.7-x86_64-3.7/src
    creating build/temp.macosx-10.7-x86_64-3.7/src/pyq
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/parvpatel/miniconda3/envs/py3_q/include -arch x86_64 -I/Users/parvpatel/miniconda3/envs/py3_q/include -arch x86_64 -DKXVER=3 -DKXVER2=5 -I/Users/parvpatel/miniconda3/envs/py3_q/include/python3.7m -c src/pyq/_k.c -o build/temp.macosx-10.7-x86_64-3.7/src/pyq/_k.o -Wpointer-arith -Werror -fno-strict-aliasing
    src/pyq/_k.c:110:11: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
        char *str = PyUnicode_AsUTF8AndSize(obj, psize);
              ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/pyq/_k.c:1337:17: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                    PY_SET_SN(dest[i], obj)
                    ^~~~~~~~~~~~~~~~~~~~~~~
    src/pyq/_k.c:103:19: note: expanded from macro 'PY_SET_SN'
                char *str = PyUnicode_AsUTF8AndSize(obj, &size); \
                      ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/pyq/_k.c:1343:13: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                PY_SET_SN(xs, obj)
                ^~~~~~~~~~~~~~~~~~
    src/pyq/_k.c:103:19: note: expanded from macro 'PY_SET_SN'
                char *str = PyUnicode_AsUTF8AndSize(obj, &size); \
                      ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/pyq/_k.c:2515:13: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                PY_SET_SN(xS[i], o)
                ^~~~~~~~~~~~~~~~~~~
    src/pyq/_k.c:103:19: note: expanded from macro 'PY_SET_SN'
                char *str = PyUnicode_AsUTF8AndSize(obj, &size); \
                      ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/pyq/_k.c:4031:9: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
            PY_SET_SN(s, obj);
            ^~~~~~~~~~~~~~~~~
    src/pyq/_k.c:103:19: note: expanded from macro 'PY_SET_SN'
                char *str = PyUnicode_AsUTF8AndSize(obj, &size); \
                      ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5 errors generated.
    error: command 'gcc' failed with exit status 1`

   ` ----------------------------------------`
`Command "/Users/parvpatel/miniconda3/envs/py3_q/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/xd/rlvz74x150l_j9y42kzv3sfc0000gn/T/pip-req-build-t_6skbt_/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/xd/rlvz74x150l_j9y42kzv3sfc0000gn/T/pip-record-ahh3x2wt/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/xd/rlvz74x150l_j9y42kzv3sfc0000gn/T/pip-req-build-t_6skbt_/
```

@sitsang
Copy link

sitsang commented Jan 28, 2019

It is not related to the python. The error you sent is due to the Werror flag and the gcc version you are using. Try and remove the CFLAGS so that it won't treat that gcc warning as error.

@ppatel26
Copy link

ppatel26 commented Jan 28, 2019

@sitsang can you please show how do I go about removing those? Thank you

@sitsang
Copy link

sitsang commented Jan 28, 2019

You can remove line 52 in setup.py

@ppatel26
Copy link

@sitsang Thank you. That worked.

Unfortunately. When I run pyq I now get another error.

Welcome to kdb+ 32bit edition
For support please see http://groups.google.com/d/forum/personal-kdbplus
Tutorials can be found at http://code.kx.com
To exit, type \
To remove this startup msg, edit q.q
'2019.01.28T14:21:33.731 dlopen(/Users/parvpatel/q/m32/p.so, 2): no suitable image found. Did find:
/Users/parvpatel/q/m32/p.so: mach-o, but wrong architecture
/Users/parvpatel/q/m32/p.so: mach-o, but wrong architecture
[4] /Users/parvpatel/q/p.k:3: (p 2:(p_init;1))python_dll
^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants