Skip to content

Commit

Permalink
build!: remove Windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Aug 15, 2024
1 parent 655e543 commit 0162065
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 484 deletions.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ body:
description: >
We need to know a bit more about the context in which Snapcraft failed.
- Are you running Snapcraft in destructive-mode, using LXD or Multipass.
- On what system is Snapcraft running (e.g.; Ubuntu 22.04 LTS, Windows 11,
OS X 10.15).
- On what system is Snapcraft running (e.g.; Ubuntu 24.04 LTS, OS X 10.15).
validations:
required: true
- type: textarea
Expand Down
74 changes: 0 additions & 74 deletions appveyor.yml

This file was deleted.

62 changes: 0 additions & 62 deletions snapcraft.spec

This file was deleted.

11 changes: 0 additions & 11 deletions tests/unit/store/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,6 @@ def test_useragent_linux_with_testing(monkeypatch, testing_env):
)


@pytest.mark.parametrize("testing_env", ("TRAVIS_TESTING", "AUTOPKGTEST_TMP"))
def test_useragent_windows_with_testing(monkeypatch, testing_env):
"""Construct a user-agent as a patched Windows machine"""
monkeypatch.setenv(testing_env, "1")
os_platform = OSPlatform(system="Windows", release="10", machine="AMD64")

assert client.build_user_agent(version="7.1.0", os_platform=os_platform) == (
"snapcraft/7.1.0 (testing) Windows/10 (AMD64)"
)


#####################
# Store Environment #
#####################
Expand Down
13 changes: 0 additions & 13 deletions tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,6 @@ def test_get_os_platform_alternative_formats(tmp_path, mocker, name):
assert os_platform.system == result


def test_get_os_platform_windows(mocker):
"""Get platform from a patched Windows machine."""
mocker.patch("platform.system", return_value="Windows")
mocker.patch("platform.release", return_value="10")
mocker.patch("platform.machine", return_value="AMD64")

os_platform = utils.get_os_platform()

assert os_platform.system == "Windows"
assert os_platform.release == "10"
assert os_platform.machine == "AMD64"


@pytest.mark.parametrize(
"platform_machine,platform_architecture,deb_arch",
[
Expand Down
6 changes: 0 additions & 6 deletions tools/freeze-requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ requirements_fixups() {

# https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1635463
sed -i '/pkg[-_]resources==0.0.0/d' "$req_file"

# Pinned pyinstaller for windows.
if [[ "$req_file" == "requirements-devel.txt" ]]; then
sed -i '/pyinstaller/d' "$req_file"
echo 'pyinstaller==5.13.1; sys.platform == "win32"' >> "$req_file"
fi
}

venv_dir="$(mktemp -d)"
Expand Down
21 changes: 1 addition & 20 deletions tools/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import fileinput
import os
import pathlib
import subprocess
import sys


def determine_version():
Expand Down Expand Up @@ -59,21 +56,5 @@ def determine_version():
return f"{version}.post{distance}+git{commit[1:]}"


def set_snapcraft_iss():
snapcraft_iss_path = pathlib.Path("windows/snapcraft.iss")
assert (
snapcraft_iss_path.exists()
), f"Run from project root and ensure {snapcraft_iss_path!s} exists."
with fileinput.input(str(snapcraft_iss_path), inplace=True) as iss_file:
for line in iss_file:
if line.startswith("AppVersion="):
print(f"AppVersion={determine_version()}")
else:
print(line, end="")


if __name__ == "__main__":
if len(sys.argv) == 2 and sys.argv[1] == "set-snapcraft-iss":
set_snapcraft_iss()
else:
print(determine_version())
print(determine_version())
44 changes: 0 additions & 44 deletions windows/AppxManifest.xml

This file was deleted.

3 changes: 0 additions & 3 deletions windows/generate-self-signed-cert.ps1

This file was deleted.

Loading

0 comments on commit 0162065

Please sign in to comment.