use crate::prelude::internal::*;
mod paths;
#[derive(Debug, PartialEq, Clone, Serialize)]
pub struct GtpPkgConfig<'a, LangConfig: GtpLangConfig> {
pub dist: &'a GtpDistDirPath,
pub version: Option<&'a Version>,
pub package: bool,
pub target: &'a LangConfig,
}
impl<'a, LangConfig: GtpLangConfig> GtpPkgConfig<'a, LangConfig> {
pub fn new(
dist: &'a GtpDistDirPath,
target: &'a LangConfig,
version: Option<&'a Version>,
package: bool,
) -> Self {
Self {
dist,
version,
package,
target,
}
}
pub fn package_enabled(&self) -> bool {
self.target.package().unwrap_or(self.package)
}
}
pub enum GtpConfigLangIdent {
Py,
Rs,
Ts,
}