Coder Social home page Coder Social logo

Comments (5)

tammoippen avatar tammoippen commented on June 3, 2024

Hi @gorlins,

Thank you for the kind words! In version 1.2.1 i changed the dev dependency manager from pipenv to poetry. All else should be the same. I guess, what you experienced is a missing cython during install (and maybe some caching?). The cythonize happens during execution of the setup.py script, i.e. cython has to be in the PATH at that time. With pipenv / poetry i do not know the install order of dev / prod dependencies and whether dev deps will be available for prod deps on install ( i guess not). To be sure dependencies will be cythonized, cython should be installed globally or in the corresponding venv before installing geohash-hilbert. I hope this helps.

Best, Tammo

from geohash-hilbert.

gorlins avatar gorlins commented on June 3, 2024

hmm... i think you are partially right, on further inspection fresh rebuilds of an environ even with Cython in a pipfile --dev and the cython deps do not work, even at 1.2.0. However, reinstalling that dependency fixes the issue. I thought --dev deps were supposed to be installed first via pipenv, but it appears this is not working in this case.

However, even with Cython already in the pipenv, I'm not able to install >=1.2.1 and get the cython extensions to work. I'm not fully a master of pip cache internals, but I think this shows that the build is not working properly:

➜  conda create -n testcy python=3.7 pip cython
➜ conda activate testcy
➜ pip freeze
certifi==2019.11.28
Cython==0.29.15
(testcy) ➜ pip install --no-cache-dir geohash-hilbert
Collecting geohash-hilbert
  Downloading geohash-hilbert-1.3.1.tar.gz (2.2 MB)
     |████████████████████████████████| 2.2 MB 1.7 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: geohash-hilbert
  Building wheel for geohash-hilbert (PEP 517) ... done
  Created wheel for geohash-hilbert: filename=geohash_hilbert-1.3.1-cp37-cp37m-macosx_10_9_x86_64.whl size=2218004 sha256=da99a1afc0fa8bf2344b478a0b282a16988e5cb0b6aee1cc201388877e169067
  Stored in directory: /private/var/folders/53/_y8h2sj95rl1v2y10t24dyhcmdbs20/T/pip-ephem-wheel-cache-0mowd50i/wheels/f3/14/48/bb531ad34216ee2c9573b66f8fd48e00d0cc603e556d18fc14
Successfully built geohash-hilbert
Installing collected packages: geohash-hilbert
Successfully installed geohash-hilbert-1.3.1
➜  python -c "from geohash_hilbert._hilbert import *; print(CYTHON_AVAILABLE)"
False
➜ pip install --no-cache-dir geohash-hilbert==1.2.0
Collecting geohash-hilbert==1.2.0
  Downloading geohash-hilbert-1.2.tar.gz (21 kB)
Building wheels for collected packages: geohash-hilbert
  Building wheel for geohash-hilbert (setup.py) ... done
  Created wheel for geohash-hilbert: filename=geohash_hilbert-1.2-cp37-cp37m-macosx_10_9_x86_64.whl size=26116 sha256=4cb83afc83e3f5563ea50cc8051df646b6c4cd72ef44abe7e8ad2f1fdfa9f0c6
  Stored in directory: /private/var/folders/53/_y8h2sj95rl1v2y10t24dyhcmdbs20/T/pip-ephem-wheel-cache-_rauaa8i/wheels/50/63/82/f39ce3c9c87dce9615355a4bd67f3d58e026172d3b93992e1e
Successfully built geohash-hilbert
Installing collected packages: geohash-hilbert
  Attempting uninstall: geohash-hilbert
    Found existing installation: geohash-hilbert 1.3.1
    Uninstalling geohash-hilbert-1.3.1:
      Successfully uninstalled geohash-hilbert-1.3.1
Successfully installed geohash-hilbert-1.2
(testcy) ➜  advanced_python git:(master) ✗ python -c "from geohash_hilbert._hilbert import *; print(CYTHON_AVAILABLE)"
True

from geohash-hilbert.

tammoippen avatar tammoippen commented on June 3, 2024

mmmh.... after a lot of trail and error I found this: pypa/pip#6144

Basically, since pip 19.0, they use isolated builds, if a pyproject.toml is present (since geohash-hilbert >=1.2.1) - hence the pip install does not see cython. For now, you can either install pip 18.1 or wait a bit until i create the next release with the pyproject.toml removed.

from geohash-hilbert.

tammoippen avatar tammoippen commented on June 3, 2024

Can you please test, whether v1.4.0 works for you.

from geohash-hilbert.

gorlins avatar gorlins commented on June 3, 2024

Sorry I dropped out to prioritize other things, we can test soon I think. Thank you!

from geohash-hilbert.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.