1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#![cfg_attr(
feature = "sdist",
feature(proc_macro, spezialization, concat_idents)
)]
#![deny(missing_docs)]
extern crate base64;
extern crate cargo_metadata;
#[cfg(feature = "auditwheel")]
extern crate elfkit;
#[macro_use]
extern crate failure;
extern crate reqwest;
extern crate rpassword;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
extern crate sha2;
#[macro_use]
extern crate structopt;
extern crate target_info;
extern crate toml;
extern crate zip;
#[cfg(feature = "sdist")]
#[macro_use]
extern crate capybara;
#[cfg(feature = "sdist")]
extern crate libflate;
#[cfg(feature = "sdist")]
extern crate tar;
#[cfg(feature = "auditwheel")]
pub use auditwheel::{auditwheel_rs, AuditWheelError};
pub use build_context::BuildContext;
pub use build_rust::build_rust;
#[cfg(feature = "sdist")]
use capybara::prelude::*;
pub use cargo_toml::CargoToml;
pub use metadata::{Metadata21, WheelMetadata};
pub use python_interpreter::PythonInterpreter;
pub use registry::Registry;
#[cfg(feature = "sdist")]
pub use sdist::build_source_distribution;
pub use upload::{upload, upload_wheels, UploadError};
pub use wheel::build_wheel;
mod build_context;
mod build_rust;
#[cfg(feature = "auditwheel")]
mod auditwheel;
mod cargo_toml;
mod metadata;
mod python_interpreter;
mod registry;
#[cfg(feature = "sdist")]
mod sdist;
mod upload;
mod wheel;
#[cfg(feature = "sdist")]
#[capybara]
pub fn install_sdist() -> () {
let pyproject_toml =
std::fs::read_to_string("pyproject.toml").expect("Couldn't read pyproject.toml");
let _pyproject: sdist::Pyproject =
toml::from_str(&pyproject_toml).expect("The pyproject.toml has an invalid format");
println!("Hello World from install sdist");
}
#[cfg(feature = "sdist")]
capybara_init! {pyo3_pack, [], [install_sdist]}