void-packages/srcpkgs/micropython/patches/micropython-no-git.patch
Alessio Sergi 285ad3ec2b micropython: update to 1.4.3
- use our {C,LD}FLAGS
- do not strip
- add patch to make sure the binary contains a proper version number
- install license
- misc tweaks

Close #1608.
2015-05-28 15:48:14 +02:00

33 lines
1.3 KiB
Diff

diff --git py/makeversionhdr.py py/makeversionhdr.py
index e37496d..7d81ecb 100644
--- py/makeversionhdr.py
+++ py/makeversionhdr.py
@@ -5,26 +5,10 @@ from __future__ import print_function
import sys
import os
import datetime
-import subprocess
def make_version_header(filename):
- # Note: git describe doesn't work if no tag is available
- try:
- git_tag = subprocess.check_output(["git", "describe", "--dirty", "--always"], universal_newlines=True).strip()
- except subprocess.CalledProcessError:
- git_tag = ""
- try:
- git_hash = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"], stderr=subprocess.STDOUT, universal_newlines=True).strip()
- except subprocess.CalledProcessError:
- git_hash = "unknown"
-
- try:
- # Check if there are any modified files.
- subprocess.check_call(["git", "diff", "--no-ext-diff", "--quiet", "--exit-code"], stderr=subprocess.STDOUT)
- # Check if there are any staged files.
- subprocess.check_call(["git", "diff-index", "--cached", "--quiet", "HEAD", "--"], stderr=subprocess.STDOUT)
- except subprocess.CalledProcessError:
- git_hash += "-dirty"
+ git_tag = "v1.4.3"
+ git_hash = "d7b7d5f"
# Try to extract MicroPython version from git tag
if git_tag.startswith("v"):