##// END OF EJS Templates
setup: include additional packages in py2exe distribution...
setup: include additional packages in py2exe distribution I'm attempting to reproduce the Inno installers on my local machine. As part of auditing differences between installer output, I noticed that the existing Inno installers include various 3rd party packages. There is no mention of this in the build instructions nor on the wiki. This must be something that is done by the installer producer. This commit teaches setup.py to include these 3rd party packages in py2exe's library. After this change, I am able to produce Inno installers that have a nearly identical set of Python modules. It's worth noting that pywin32 is included even though it probably shouldn't be. But including it is necessary in order to achieve parity with existing Inno installers. Differential Revision: https://phab.mercurial-scm.org/D6064

File last commit:

r41277:168041fa default
r42017:ed350574 default
Show More
testing.rs
72 lines | 1.7 KiB | application/rls-services+xml | RustLexer
// testing.rs
//
// Copyright 2018 Georges Racinet <georges.racinet@octobus.net>
//
// This software may be used and distributed according to the terms of the
// GNU General Public License version 2 or any later version.
use crate::{Graph, GraphError, Revision, NULL_REVISION};
/// A stub `Graph`, same as the one from `test-ancestor.py`
///
/// o 13
/// |
/// | o 12
/// | |
/// | | o 11
/// | | |\
/// | | | | o 10
/// | | | | |
/// | o---+ | 9
/// | | | | |
/// o | | | | 8
/// / / / /
/// | | o | 7
/// | | | |
/// o---+ | 6
/// / / /
/// | | o 5
/// | |/
/// | o 4
/// | |
/// o | 3
/// | |
/// | o 2
/// |/
/// o 1
/// |
/// o 0
#[derive(Clone, Debug)]
pub struct SampleGraph;
impl Graph for SampleGraph {
fn parents(&self, rev: Revision) -> Result<[Revision; 2], GraphError> {
match rev {
0 => Ok([NULL_REVISION, NULL_REVISION]),
1 => Ok([0, NULL_REVISION]),
2 => Ok([1, NULL_REVISION]),
3 => Ok([1, NULL_REVISION]),
4 => Ok([2, NULL_REVISION]),
5 => Ok([4, NULL_REVISION]),
6 => Ok([4, NULL_REVISION]),
7 => Ok([4, NULL_REVISION]),
8 => Ok([NULL_REVISION, NULL_REVISION]),
9 => Ok([6, 7]),
10 => Ok([5, NULL_REVISION]),
11 => Ok([3, 7]),
12 => Ok([9, NULL_REVISION]),
13 => Ok([8, NULL_REVISION]),
r => Err(GraphError::ParentOutOfRange(r)),
}
}
}
// A Graph represented by a vector whose indices are revisions
// and values are parents of the revisions
pub type VecGraph = Vec<[Revision; 2]>;
impl Graph for VecGraph {
fn parents(&self, rev: Revision) -> Result<[Revision; 2], GraphError> {
Ok(self[rev as usize])
}
}