Code Monkey home page Code Monkey logo

Comments (5)

zooba avatar zooba commented on May 18, 2024

Interesting. It seems like python -m cython is finding a different Cython directory other than the one it should be installing? Is it possible that you've got a directory somewhere named cython that is on PYTHONPATH perhaps? I'm basing that on this error:

F:\gv\Python310\python.exe: No module named cython.__main__; 'cython' is a package and cannot be directly executed

I just ran a test in a clean checkout with pip wheel . and had no issues, so it may be something to do with pyproject-build? I don't recognise that tool.

For what it's worth, the build instructions (which I'll add to the readme) will essentially be:

<activate virtual environment>
pip install Cython pymsbuild
python -m pymsbuild
$env:PYTHONPATH = (Get-Item .\src)

Could you let me know if those work for you or if you have the same issue?

from dlltracer-python.

gvanem avatar gvanem commented on May 18, 2024

Is it possible that you've got a directory somewhere named cython that is on PYTHONPATH perhaps?

No. And I have only 1 Cython. envtool --py -v cython:

  1:  name:      cython
      version:   3.0.8
      date:      01 Mar 2024 - 10:04:18
      location:  f:\gv\python310\Lib\site-packages\
      dist-info: f:\gv\python310\Lib\site-packages\Cython-3.0.8.dist-info\METADATA
      summary:   The Cython compiler for writing C extensions in the Python language.
      home-page: https://cython.org/
      author:    Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al. <[email protected]>
      installer: pip
      requires:  <none>
      py-req:    >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*

1 match found for "cython".

<activate virtual environment>
pip install Cython pymsbuild
python -m pymsbuild
$env:PYTHONPATH = (Get-Item .\src)
Could you let me know if those work for you or if you have the same issue?

Why is this venv crap needed to use build and use this package? Last time I used virtualenv.exe + activate.bat it created a royal mess. I'll stick to my .bat or create a GNU-makefile.

from dlltracer-python.

zooba avatar zooba commented on May 18, 2024

You can leave out the virtual environment if you want, but then if you work with multiple projects you may find yourself having to upgrade/downgrade packages whenever you switch. The tooling isn't ideal, but it's usually better for most people than the alternative mess.

from dlltracer-python.

gvanem avatar gvanem commented on May 18, 2024

** work with multiple projects **

What do you mean by this? Sure, I have multiple Py-projects. And they all seems to work w/o any venv.

PS. I updated by .bat-file for pytest.exe -vv tests/test_basic.py. Works fine AFAICS.

But can you please show me the cython + cl flags used in your build since I fail to get any
dlltracer.__doc__ value. This py -3 -c "import dlltracer; print(dlltracer.__doc__)" returns None ?!

An oversight?

from dlltracer-python.

zooba avatar zooba commented on May 18, 2024

There just isn't any documentation in dlltracer\__init__.py, so that's expected. Should probably add some, but it's not caused by build options, just the lack of a docstring in a regular .py file.

What do you mean by this? Sure, I have multiple Py-projects. And they all seems to work w/o any venv.

The potential problem is when you have two projects that require different sets of packages. For example, if one needed pymsbuild<1.0 and the other needed pymsbuild>=1.0, then you'd have to keep reinstalling the right version whenever you work on each one.

If you haven't run into this problem yet, great! But when you hit it, you'll find that the solution is to create a virtual environment for each project rather than sharing packages between them.

from dlltracer-python.

Related Issues (3)

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.