Giter VIP home page Giter VIP logo

c-extension-tutorial's People

Contributors

ehebert avatar jgrillo avatar jonkiparsky avatar madphysicist avatar richafrank avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

c-extension-tutorial's Issues

Suggestion: include a bit on memory management

Some questions that have been bothering me about the functions described in https://docs.python.org/3/c-api/memory.html:

  • What are the differences between PyMem_RawMalloc, PyMem_Malloc, PyObject_Malloc, etc.?
  • Do these functions automatically raise a MemoryError if they return None?

While the answers are out there (I ended up reading the source code and some Stack Overflow posts), they are non-trivial to find.

source setup-env fails with Xcode errors (Macbook running Sierra)

Here is the stderr of the setup-env command, anything obvious jump out to anyone? (trying to hack around it now)

 Updating Homebrew...
  ^[[33mWarning:^[[0m openssl is a keg-only and another version is linked to opt.
  ^[[33mWarning:^[[0m xz-5.2.3 already installed
  Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SD
    Ks/MacOSX10.12.sdk/usr/include/c++/4.2.1
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(dynamic_annotations.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(pymath.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(dynamic_annotations.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(pymath.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(dynamic_annotations.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(pymath.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(dynamic_annotations.o) has no symbols
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.6dm.a(pymath.o) has no symbols
 Error: Command '['/Users/SeanH/git/c-extension-tutorial/venv/bin/python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

Cannot get Venv

Hello,

I tried to set this up, but I keep getting an error where the setup-env script never creates the venv:

...
renaming build/scripts-3.6/pydoc3 to build/scripts-3.6/pydoc3.6
renaming build/scripts-3.6/idle3 to build/scripts-3.6/idle3.6
renaming build/scripts-3.6/2to3 to build/scripts-3.6/2to3-3.6
renaming build/scripts-3.6/pyvenv to build/scripts-3.6/pyvenv-3.6
~/Desktop/c_extension_tutorial/c-extension-tutorial
bash: ./submodules/cpython/python: is a directory
cp: venv/bin/python-gdb.py: No such file or directory
bash: venv/bin/activate: No such file or directory
Requirement already satisfied: ipython in /usr/local/lib/python3.5/site-packages
Requirement already satisfied: traitlets>=4.2 in /usr/local/lib/python3.5/site-packages (from ipython)
...

The issue is that there is a ./submodules/cpython/Python directory (I am on MacOS X) and it seems like the python file was never compiled, although there is a python.exe.

Is there any idea as to how I might go about fixing this? I didn't want to rename the Python directory lest I break something else...

Failed to set up environment

I am trying to install the tutorial on a brand new Ubuntu 16.04 LTS virtual machine. I am able to clone the repository and compile Python 3.6. However, the install script fails near the end when it's trying to execute:

venv/bin/python -Im ensurepip --upgrade --default-pip

When I run the command manually, I see the problem is that the "zlib" module is missing (can't decompress data; zlib not available).

What am I doing wrong?

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.