Commit Graph

35 Commits

Author SHA1 Message Date
Daniel Grunwald f6ed2bbae9 Fix #10: Windows support.
We keep the #[link] attributes in #[cfg_attr(windows)] so that we don't require a nightly Rust build on non-Windows platforms.
This can be simplified once RFC 1717 is available in a stable rust version.

This commit also increases the minimum Rust version to 1.13.
2016-12-17 15:46:52 +01:00
Mathias Svensson 35917e967b Make PyStringObject and PyBytesObject public 2016-11-13 11:51:23 +01:00
Daniel Grunwald fffcf57834 Add support for __len__ special method. 2016-04-17 23:26:33 +02:00
Daniel Grunwald 309182cfe8 py_class!: Add support for "def __new__(cls)". 2016-03-12 00:06:39 +01:00
Daniel Grunwald ba325b10d4 python27-sys 0.1.1 and python3-sys 0.1.2 release 2016-03-05 17:40:41 +01:00
Daniel Grunwald 7269dc64c2 python*-sys: use #![no_std] 2016-01-22 20:38:34 +01:00
Daniel Grunwald e8a69d9431 Remove unused pkg_config dependency from python27-sys 2015-12-20 13:57:26 +01:00
Daniel Grunwald e935111c9c Update interpolate_idents to my fork (adjusted for currently Rust nightlies).
Update libc to 0.2.
2015-11-07 17:10:20 +01:00
Daniel Grunwald d33a4b68fc Add test script that all symbols imported by python-sys are exported from the python .so 2015-09-20 22:21:18 +02:00
Daniel Grunwald 93b522404e python27-sys: Add struct definitions for PyCodeObject and PyFrameObject.
Closes #21.
2015-09-19 16:10:15 +02:00
Daniel Grunwald a0cda1a66b python27-sys: compile.h 2015-09-19 13:56:50 +02:00
Daniel Grunwald 3e2dca717e Fix compiler warning (unused std::fs) 2015-08-21 21:28:13 +02:00
James Salter 93645484ed Remove pkgconfig approach from -sys builds.
* pkgconfig is frequently broken or missing, doesn't
contain the explicit path to the interpreter (leading
to bad guesses), and confuses users. Rely on PATH alone.

* Fix bad detection of OSX shared library python

* Fix get_config_from_interpreter reporting python interpreter
path inconsistently with find_interpreter_and_get_config -
fixes OSX python.org python 3, which doesn't have a 'python'
in exec_prefix, just 'python3'
2015-08-16 12:30:57 +01:00
Daniel Grunwald a469635eca python27-sys: add missing object types 2015-07-18 13:40:26 +02:00
Daniel Grunwald a0d8670268 rust-cpython 0.0.2 2015-07-04 20:28:40 +02:00
Daniel Grunwald 29693eec12 python27-sys 0.1.0 and python3-sys 0.1.1 2015-07-04 20:20:06 +02:00
Daniel Grunwald dae7c891dc #16: Try "python" first and only try "pythonX" or "pythonX.Y" if the previous
tries result in the wrong python version.
2015-07-04 18:46:37 +02:00
Daniel Grunwald 43552a075d Enable python 3 CI 2015-06-28 21:46:24 +02:00
Daniel Grunwald 2904330b1c Improve build.rs when configuring using the python in PATH
* First try "pythonX.Y" and
  "pythonX" before using the generic "python"
* Use LDVERSION to detect 'dmu' suffix (PEP-3149)
2015-06-28 21:45:53 +02:00
Daniel Grunwald a2eb6de523 Add windows CI.
Due to the linker troubles (#10), we only build the rlib and don't run any tests.
2015-06-27 15:15:06 +02:00
Daniel Grunwald cc2d30db58 Use pkg-config 0.3.5 2015-06-18 22:50:15 +02:00
James Salter 387ca4b2d9 Merge branch 'master' of https://github.com/dgrunwald/rust-cpython 2015-05-30 17:09:36 +01:00
James Salter 981928a2f4 re-apply e84818 2015-05-30 16:59:58 +01:00
James Salter 6a1985a210 windows support for build script 2015-05-28 11:17:14 +01:00
James Salter cabcc217bf clone build.rs from python3 into python27 2015-05-28 11:08:05 +01:00
Daniel Grunwald 73e4ce3f8b #11: Allow defining python extension types
Highly incomplete initial version.
2015-05-27 21:19:32 +02:00
James Salter 124a85d749 can build with only a major python 3 version 2015-05-25 15:38:21 +01:00
James Salter b1eca56ec3 Python 3 build support
* Add python3-sys to rust-cpython as an optional feature, and
  make python27-sys also optional, but still the default
* Parametrise python27-sys/build.rs so that it is python
  version independent, and clone it into python3-sys/build.rs.
  Hopefully this can continue to be maintained as an identical
  file.
* python27-sys and python3-sys gain features for explicitly
  selecting a python version to link to. for python27-sys,
  there's currently only python27; for python3-sys there's
  python 3.4 and 3.5.
* explicitly tell travis to use nightlies (seems to have
  started trying to use 1.0.0)
2015-05-23 15:23:08 +01:00
Daniel Grunwald 461255f3fa Merge branch 'master' of https://github.com/novocaine/rust-cpython 2015-05-17 20:47:48 +02:00
Daniel Grunwald 427cdf09f8 Fix building python27-sys without Py_USING_UNICODE. 2015-05-17 18:38:35 +02:00
James Salter b3e20e900b fix issues in bb13ec, support utf16, python fom PATH
* fix ucs4 build broken by bb13ec
* add utf16 decoding to unicode.from_py_object for
  narrow unicode builds
* change unicode narrow/wide cfg flag to be
  Py_UNICODE_SIZE_4 not Py_UNICODE_WIDE, which doesn't
  appear in sysconfig
* support framework builds on os x
* python27-sys exports compilation flags as cargo vars,
  and rust-python resurrects them as cfg flags
* travis runs against local python27-sys
* rust-cpython depends on git python27-sys, because
  the one on cargo is now incompatible with it (since bb13ec)
2015-05-17 13:20:58 +01:00
James Salter 6a41227969 dynamically determine python flags for cfg
* in build.rs, call the python interpreter located by pkgconfig
and use sysconfig to determine the flags it was built with.
* pass these flags to the build via --cfg
* refactor existing references to features to refer to these
instead
2015-05-13 19:03:13 +01:00
Daniel Grunwald b9b67ee932 Add fileobject, cobject and pycapsule headers 2015-05-07 23:18:48 +02:00
Daniel Grunwald bab3214595 Remove link attributes, we use pkg-config instead 2015-05-03 01:05:14 +02:00
Daniel Grunwald 6b5da09e79 Add python27-sys to rust-cpython repository 2015-04-26 10:34:31 +02:00