diff --git a/strum/Cargo.toml b/strum/Cargo.toml index 147c7a92..becdb67b 100644 --- a/strum/Cargo.toml +++ b/strum/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "strum" +name = "sea-strum" version = "0.23.0" edition = "2018" authors = ["Peter Glotfelty "] @@ -9,24 +9,29 @@ description = "Helpful macros for working with enums and strings" keywords = ["enum", "string", "macros", "proc-macros"] categories = ["development-tools::procedural-macro-helpers", "parsing"] -documentation = "https://docs.rs/strum" -homepage = "https://github.com/Peternator7/strum" -repository = "https://github.com/Peternator7/strum" +documentation = "https://docs.rs/sea-strum" +homepage = "https://github.com/SeaQL/strum" +repository = "https://github.com/SeaQL/strum" readme = "../README.md" +[lib] +name = "strum" +path = "src/lib.rs" + [dependencies] -strum_macros = { path = "../strum_macros", optional = true, version = "0.23" } +sea-strum_macros = { path = "../strum_macros", optional = true, version = "0.23" } [dev-dependencies] -strum_macros = { path = "../strum_macros", version = "0.23" } +sea-strum_macros = { path = "../strum_macros", version = "0.23" } [badges] travis-ci = { repository = "Peternator7/strum" } [features] default = ["std"] -derive = ["strum_macros"] +derive = ["sea-strum_macros"] std = [] +sea-orm = ["sea-strum_macros/sea-orm"] [package.metadata.docs.rs] features = ["derive"] diff --git a/strum_macros/Cargo.toml b/strum_macros/Cargo.toml index e83a6bb5..2bba99cd 100644 --- a/strum_macros/Cargo.toml +++ b/strum_macros/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "strum_macros" +name = "sea-strum_macros" version = "0.23.0" edition = "2018" authors = ["Peter Glotfelty "] @@ -9,9 +9,9 @@ description = "Helpful macros for working with enums and strings" keywords = ["enum", "string", "macros", "proc-macros"] categories = ["development-tools::procedural-macro-helpers", "parsing"] -documentation = "https://docs.rs/strum" -homepage = "https://github.com/Peternator7/strum" -repository = "https://github.com/Peternator7/strum" +documentation = "https://docs.rs/sea-strum" +homepage = "https://github.com/SeaQL/strum" +repository = "https://github.com/SeaQL/strum" readme = "../README.md" [lib] @@ -27,3 +27,6 @@ syn = { version = "1.0", features = ["parsing", "extra-traits"] } [dev-dependencies] strum = "0.20" + +[features] +sea-orm = [] \ No newline at end of file diff --git a/strum_macros/src/helpers/type_props.rs b/strum_macros/src/helpers/type_props.rs index 39b0a2bd..d5f83f9b 100644 --- a/strum_macros/src/helpers/type_props.rs +++ b/strum_macros/src/helpers/type_props.rs @@ -102,7 +102,14 @@ impl StrumTypeProperties { if let Some(path) = &self.crate_module_path { parse_quote!(#path) } else { - parse_quote!(::strum) + #[cfg(feature = "sea-orm")] + { + parse_quote!(sea_orm::strum) + } + #[cfg(not(feature = "sea-orm"))] + { + parse_quote!(::strum) + } } } } diff --git a/strum_nostd_tests/Cargo.toml b/strum_nostd_tests/Cargo.toml index 9e44e16e..ece8d0b5 100644 --- a/strum_nostd_tests/Cargo.toml +++ b/strum_nostd_tests/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -strum = { path = "../strum", features = ["derive"] } -strum_macros = { path = "../strum_macros", features = [] } +sea-strum = { path = "../strum", features = ["derive"] } +sea-strum_macros = { path = "../strum_macros", features = [] } [dev-dependencies] rustversion = "1.0" \ No newline at end of file diff --git a/strum_tests/Cargo.toml b/strum_tests/Cargo.toml index 91051727..0d7a38da 100644 --- a/strum_tests/Cargo.toml +++ b/strum_tests/Cargo.toml @@ -5,8 +5,8 @@ edition = "2018" authors = ["Peter Glotfelty "] [dependencies] -strum = { path = "../strum", features = ["derive"] } -strum_macros = { path = "../strum_macros", features = [] } +sea-strum = { path = "../strum", features = ["derive"] } +sea-strum_macros = { path = "../strum_macros", features = [] } clap = "2.33.0" enum_variant_type = "=0.2.0" structopt = "0.2.18" diff --git a/travis.sh b/travis.sh old mode 100755 new mode 100644