Commit Graph

17 Commits

Author SHA1 Message Date
Alexander Niederbühl faa3feda3f Merge branch 'master' into doctest 2019-04-23 21:58:09 +02:00
Omer BenAmram f8bf258602 Support rust extensions for PyPy via cpyext (#393)
* wip

* removed stuff

* removed another change

* implemented minimum amouth of ifdefs to make pypy3 hello world to compile

* implemented minimum amount of ifdefs to make pypy3 hello world to compile

* hacking on build.rs

* compiler is happy!

* few todos remain

* extracted build logic to seperate module

* added pypy test

* finally fixed pypy structs

* removed some todos

* test should now be machine independent

* fixed all pypy3 symbols

* added pypy feature

* removed `is_pypy`

* added pypy2 declerations also

* fix for cpython2

* improved libpypy detection

* added all pypy2 macros

* fixed errneous type

* more fixes

* fix python2 string macros

* modsupport symbol

* fix

* fixed and added many symbols

* fixes

* remove dup

* remove mac-specific config

* fix all name mangling macros

* unite imports

* missing symbol

* fix pybool

* implemented another missing symbol

* it works

* fix merge conflict

* uncomment non default features

* cargo.toml

* Cargo fmt

* small merge fixes

* use newer build version

* whoops

* fix build script

* more build hacks

* some random hiccups

* small fixes

* it builds!

* it builds and runs

* revert everything in FFI2

* revert changes to ffi2

* check python3 for pypy

* tiny fix

* revert ffi2 for real

* revert weird formatting changes

* bring back missing feature

* tiny error

* fix py3.7 issue

* add pypy3.5 6.0 to travis

* remove dbg!

* another tiny fix

* removed some useless annotations, and fixed inlines annotations

* removed `pretty_assertions`

* removed pypy feature from cargo.toml

* fix for Py_CompileStringFlags

* tox runs word_count!

* __dict__ changes are not supported for PyPy

* fix 3.7 and copy comment

* fix test script 😳

* transfer ownership of strings to cpython when possible

* remove cstr! macro

* added missing nuls

* as_bytes() -> b’’ string

* symbol removed by mistake

* properly shim pypy date time API, some tests are passing!

* extension_module tests now not crashing! (some still skipped)

* maybe travis has new pypy version?

* small error on windows (build script)

* fix conditional compilation

* try to make tests run on travis..

* invert condition

* added pytest-faulthandler to facilitate debugging

* correctly name dir

* use full paths

* say —yes to conda

* fix

* syntax error

* change PATH

* fixed a terrible bug with PyTypeObjects in PyPy

* fix PyTypeObject defs

* re-enabled tests!

* all tests are passing!

* make the fix ad-hoc for now

* removed build module

* revert changes that cause an additional GC bug

* prevented buggy test from failing pypy

* removed unused comment

* don’t run coverage on pypy

* removed some erroneous symbols from function calls which are actually macros

* restore py37 pyunicode missing def

* use only `link_name` in PyPy specific declarations

* only setup PyPy when testing against PyPy

* annotation that was eaten during merge

* remove change to  comment by mistake + unnecessary changes to cargo.toml

* xfail dates test only on pypy

* changed comment to be a little more helpful

* cleaned up some warnings

* Update src/ffi3/ceval.rs

Co-Authored-By: omerbenamram <omerbenamram@gmail.com>

* @konstin PR notes

* rustfmt

* some documentation

* if configured via env var only, default to cpython

* remove extra unsafe

* refer users to guide for pypy

* Update guide/src/pypy.md

Co-Authored-By: omerbenamram <omerbenamram@gmail.com>

* Update guide/src/pypy.md

Co-Authored-By: omerbenamram <omerbenamram@gmail.com>

* @konstin applied patch

* check that pypy at least build

* search explicitly for libpypy

* added note about some known unsupported features

* use ld_version

* export PYTHON_SYS_EXECUTABLE to `cargo build` test

* inverted if

* always link pypy dynamically

* remove unused imports

* Apply @kngwyu’s suggestion

* fix tox configuration

* try conda virtualenv

* try to simply not install python at all inside pypy environment

* setup pypy before using “python"

* use system_site_packages

* revert change to .travis

* moved cpyext datetime documentation to module level, and revised it.

* Update src/ffi/datetime.rs

Co-Authored-By: omerbenamram <omerbenamram@gmail.com>

* rustfmt

* Update src/ffi/datetime.rs

Co-Authored-By: omerbenamram <omerbenamram@gmail.com>

* kept only notes that are relevant to users.

* invert if

* use bash and not sh
2019-04-23 13:18:42 +02:00
Alexander Niederbühl f1b0288d3c Remove docmatic and several workarounds for the doctests 2019-04-19 22:47:21 +02:00
konstin 97189a16b9 Try fixing cargo fmt on travis ci 2019-03-24 17:19:15 +01:00
Alexander Niederbühl 5cc43b8d86 Reactivate coverage on CI
Also exclude tests from coverage report and test py3-derive-backend in
travis.
2019-03-18 01:05:08 +01:00
Alexander Niederbühl e2e4733b82 Test examples in user guide with travis
Test could only be activated for Python 3.5 and some tests had to be
ignored, see #381 and #387.
2019-03-09 23:54:28 +01:00
kngwyu c1421e2e08 Run rustfmt and clippy only at minimum nightly 2019-02-19 00:01:23 +09:00
konstin 936f0153e8 Migrate to rust 2018 2019-02-01 14:23:29 +01:00
Joar Wandborg 42557beb50
Use -e instead of || exit 2019-01-10 08:06:58 +01:00
Joar Wandborg 2bd5931a04
Pass -c to "examples/*" tox invocation
The `-c example-path/tox.init` parameter will read the tox.ini from the
provided location and also set `workdir` and `toxinidir` to the
directory of the passed tox.ini

Previously, when only --workdir was passed, tox read the root `tox.ini`,
with the effect that tox was never run on the projects in `examples/`.
2019-01-09 21:19:23 +01:00
konstin 2dc8813cf8 Improve testing setup 2019-01-08 20:18:23 +01:00
konstin 42f84ff881 Add clippy to travis 2018-11-15 15:23:45 +01:00
Paul Ganssle 078bea4345
Move rustapi_module into examples
This is really a test module, but the Rust convention is to put
something like this under examples/, and when it lands, we can take
advantage of "Project-based Examples for Cargo Projects" - RFC link
at https://github.com/rust-lang/rfcs/pull/2517
2018-08-21 18:33:33 -04:00
Paul Ganssle 7fc1dae238
Add rustapi_module tests to CI 2018-08-21 14:29:36 -04:00
konstin b3c92f2be7 Make the travis scripts more verbose 2018-05-21 15:25:09 +02:00
konstin 5a26fa4953 Fix redirect on github pages 2018-05-05 14:19:50 +02:00
Martin Larralde 70bdf5e93c
Tidy up Travis-CI (#152)
* Use Travis-CI build matrix to setup environment
* Setup Travis cache 
* Use `sccache` to cache compiled artifacts
* Use `setup.sh` script to setup Travis-CI
* Add more tests to `ci/travis` to lighten `.travis.yml`
* Use `script` deployment to run `kcov` in Travis-CI
* Export `RUSTC_WRAPPER` in the Travis configuration directly
* Fix wrong Python `3.7` version in Travis configuration
* Fix `ci/travis/cover.sh`
* Prevent Travis-CI from cleaning build artifacts
* Recompile `kcov` only when needed in Travis-CI
* Collect coverage in parallel
* Add github-pages deployment script
2018-05-04 18:20:28 +02:00