fusion-engineering / inline-python

Inline Python code directly in your Rust code
https://docs.rs/inline-python
BSD 2-Clause "Simplified" License
1.15k stars 37 forks source link

Upgrade to PyO3 0.10. #30

Closed m-ou-se closed 4 years ago

m-ou-se commented 4 years ago

In PyO3 0.10 we disable the macros feature, to significantly reduce the dependencies:

Before:

   Compiling proc-macro2 v1.0.6
   Compiling unicode-xid v0.2.0
   Compiling syn v1.0.9
   Compiling serde v1.0.103
   Compiling ryu v1.0.2
   Compiling libc v0.2.66
   Compiling regex-syntax v0.6.12
   Compiling autocfg v0.1.7
   Compiling itoa v0.4.4
   Compiling smallvec v1.3.0
   Compiling cfg-if v0.1.10
   Compiling unindent v0.1.5
   Compiling version_check v0.9.1
   Compiling scopeguard v1.1.0
   Compiling lock_api v0.3.4
   Compiling num-traits v0.2.10
   Compiling quote v1.0.2
   Compiling parking_lot_core v0.7.1
   Compiling parking_lot v0.10.2
   Compiling regex v1.3.1
   Compiling pyo3-derive-backend v0.9.2
   Compiling proc-macro-hack v0.5.11
   Compiling serde_derive v1.0.103
   Compiling ghost v0.1.1
   Compiling inventory-impl v0.1.4
   Compiling ctor v0.1.12
   Compiling pyo3cls v0.9.2
   Compiling paste-impl v0.1.6
   Compiling indoc-impl v0.3.4
   Compiling inventory v0.1.4
   Compiling indoc v0.3.4
   Compiling paste v0.1.6
   Compiling serde_json v1.0.42
   Compiling pyo3 v0.9.2
   Compiling inline-python-macros v0.5.0
   Compiling inline-python v0.5.1
    Finished dev [unoptimized + debuginfo] target(s) in 29.96s

After:

   Compiling version_check v0.9.1
   Compiling proc-macro2 v1.0.6
   Compiling libc v0.2.66
   Compiling unicode-xid v0.2.0
   Compiling pyo3 v0.10.0
   Compiling quote v1.0.2
   Compiling inline-python-macros v0.5.0
   Compiling inline-python v0.5.1
    Finished dev [unoptimized + debuginfo] target(s) in 6.17s
m-ou-se commented 4 years ago

Now an example and a doctest are failing, that do need the macros feature. But it seems that cargo doesn't support additional features only in [dev-dependencies] for crates that are already in [dependencies]. (It accepts it, but just always enables the features.)

de-vri-es commented 4 years ago

Cool, looks good.