Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1094)

Unified Diff: vpython/api/vpython/util.go

Issue 2927573002: [vpython] Fix PEP425 naming. (Closed)
Patch Set: rebase and update Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vpython/api/vpython/spec.pb.go ('k') | vpython/application/application.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vpython/api/vpython/util.go
diff --git a/vpython/api/vpython/util.go b/vpython/api/vpython/util.go
index c4f9e2b2b69f32e77c3331f6d4dea47d7d65532a..3986a356091feec70cc455578f67a089d7039182 100644
--- a/vpython/api/vpython/util.go
+++ b/vpython/api/vpython/util.go
@@ -15,7 +15,7 @@ import (
//
// This version string is used in the generation of filenames, and must be
// filesystem-compatible.
-const Version = "v1"
+const Version = "v2"
// Clone returns a deep clone of the supplied Environment.
//
@@ -28,27 +28,27 @@ func (e *Environment) Clone() *Environment {
}
// IsZero returns true if this tag is a zero value.
-func (t *Pep425Tag) IsZero() bool {
- return t == nil || (t.Version == "" && t.Abi == "" && t.Arch == "")
+func (t *PEP425Tag) IsZero() bool {
+ return t == nil || (t.Python == "" && t.Abi == "" && t.Platform == "")
}
// TagString returns an underscore-separated string containing t's fields.
-func (t *Pep425Tag) TagString() string {
- return strings.Join([]string{t.Version, t.Abi, t.Arch}, "-")
+func (t *PEP425Tag) TagString() string {
+ return strings.Join([]string{t.Python, t.Abi, t.Platform}, "-")
}
// HasABI returns true if t declares that it only works with a specific ABI.
-func (t *Pep425Tag) HasABI() bool { return t.Abi != "none" }
+func (t *PEP425Tag) HasABI() bool { return t.Abi != "none" }
-// AnyArch returns true if t declares that it works on any architecture.
-func (t *Pep425Tag) AnyArch() bool { return t.Arch == "any" }
+// AnyPlatform returns true if t declares that it works on any platform.
+func (t *PEP425Tag) AnyPlatform() bool { return t.Platform == "any" }
// Count returns the number of populated fields in this tag.
-func (t *Pep425Tag) Count() (v int) {
+func (t *PEP425Tag) Count() (v int) {
if t.HasABI() {
v++
}
- if t.AnyArch() {
+ if t.AnyPlatform() {
v++
}
return
« no previous file with comments | « vpython/api/vpython/spec.pb.go ('k') | vpython/application/application.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698