Skip to content

Commit 22df130

Browse files
authored
Vendor markupsafe; Add macOS and Windows CI jobs (#215)
* Add macOS and Windows CI jobs Signed-off-by: Nico Burns <[email protected]> * Vendor markupsafe library Signed-off-by: Nico Burns <[email protected]> * Set newline='' Signed-off-by: Nico Burns <[email protected]> * Add markupsafe license Signed-off-by: Nico Burns <[email protected]> --------- Signed-off-by: Nico Burns <[email protected]>
1 parent 14c096b commit 22df130

File tree

5 files changed

+439
-2
lines changed

5 files changed

+439
-2
lines changed

.github/workflows/main.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,30 @@ jobs:
3434
env:
3535
RUST_BACKTRACE: 1
3636

37+
macos-debug:
38+
name: macOS (Debug)
39+
runs-on: macos-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- name: Install Rust
43+
uses: dtolnay/rust-toolchain@stable
44+
- name: Run Tests
45+
run: cargo build --features servo
46+
env:
47+
RUST_BACKTRACE: 1
48+
49+
windows-debug:
50+
name: Windows (Debug)
51+
runs-on: windows-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
- name: Install Rust
55+
uses: dtolnay/rust-toolchain@stable
56+
- name: Run Tests
57+
run: cargo build --features servo
58+
env:
59+
RUST_BACKTRACE: 1
60+
3761
build-result:
3862
name: Result
3963
runs-on: ubuntu-latest

style/properties/build.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
import sys
99

1010
BASE = os.path.dirname(__file__.replace("\\", "/"))
11-
sys.path.insert(0, os.path.join(BASE, "mako-1.3.10-py3-none-any.whl"))
11+
sys.path.insert(0, os.path.join(BASE, "vendored_python", "mako-1.3.10-py3-none-any.whl"))
12+
sys.path.insert(0, os.path.join(BASE, "vendored_python")) # For importing markupsafe
1213
sys.path.insert(0, BASE) # For importing `data.py`
1314

1415
from mako import exceptions
@@ -114,7 +115,7 @@ def write(directory, filename, content):
114115
if not os.path.exists(directory):
115116
os.makedirs(directory)
116117
full_path = os.path.join(directory, filename)
117-
open(full_path, "w", encoding="utf-8").write(content)
118+
open(full_path, "w", encoding="utf-8", newline="").write(content)
118119

119120
python_addr = RE_PYTHON_ADDR.search(content)
120121
if python_addr:
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Copyright 2010 Pallets
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
1. Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
14+
3. Neither the name of the copyright holder nor the names of its
15+
contributors may be used to endorse or promote products derived from
16+
this software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)