[vpython] Fix PEP425 naming.
Early choices resulted in some incorrect naming of PEP425 structure
fields. Fix this before "vpython" is used in too many places to make
fixing this feasible.
The "Pep425Tag" Protobuf struct is now named "PEP425Tag" so that its
Go-generated structure is more idiomatic. This has no impact on the text
or binary protobuf format.
The fields in a "Pep425Tag" have been renamed from "Version, ABI, Arch"
to the proper "Python, ABI, Platform" terminology used in PEP425. This
will break existing text protobuf naming, so we have updated the
protobuf version from "v1" to "v2".
BUG=None
TEST=local
Review-Url: https://codereview.chromium.org/2927573002
diff --git a/vpython/api/vpython/env.pb.go b/vpython/api/vpython/env.pb.go
index 57341b9..cbd5294 100644
--- a/vpython/api/vpython/env.pb.go
+++ b/vpython/api/vpython/env.pb.go
@@ -13,7 +13,7 @@
It has these top-level messages:
Environment
Runtime
- Pep425Tag
+ PEP425Tag
Spec
*/
package vpython
@@ -40,7 +40,7 @@
// The resolved runtime parameters.
Runtime *Runtime `protobuf:"bytes,2,opt,name=runtime" json:"runtime,omitempty"`
// The PEP425 tags that were probed for this Python environment.
- Pep425Tag []*Pep425Tag `protobuf:"bytes,3,rep,name=pep425_tag,json=pep425Tag" json:"pep425_tag,omitempty"`
+ Pep425Tag []*PEP425Tag `protobuf:"bytes,3,rep,name=pep425_tag,json=pep425Tag" json:"pep425_tag,omitempty"`
}
func (m *Environment) Reset() { *m = Environment{} }
@@ -62,7 +62,7 @@
return nil
}
-func (m *Environment) GetPep425Tag() []*Pep425Tag {
+func (m *Environment) GetPep425Tag() []*PEP425Tag {
if m != nil {
return m.Pep425Tag
}
@@ -115,20 +115,21 @@
}
var fileDescriptor0 = []byte{
- // 239 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x8f, 0x41, 0x4b, 0xc4, 0x30,
- 0x10, 0x85, 0xa9, 0x5d, 0x2c, 0x9d, 0x22, 0xc8, 0x9c, 0xc2, 0x9e, 0xd6, 0x3d, 0x2d, 0x82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x5a, 0x41, 0x23, 0xf6, 0x0c, 0x59, 0x3f, 0xba, 0x60, 0x3b, 0xc5, 0xef, 0x88, 0x7a, 0x5c, 0x28,
+ 0x11, 0x7d, 0x71, 0x05, 0xd8, 0x2b, 0x40, 0xac, 0xf9, 0x1d, 0xa4, 0xe6, 0xe9, 0x26, 0xdd, 0x15,
+ 0x35, 0x5b, 0xf0, 0xe3, 0xe1, 0xb8, 0xaf, 0x9b, 0x93, 0xd4, 0x22, 0x8f, 0xd4, 0x49, 0xea, 0xed,
+ 0x27, 0x64, 0xf3, 0x1a, 0xc6, 0x60, 0x85, 0x32, 0x18, 0x2a, 0x93, 0x0b, 0xd2, 0x17, 0xcf, 0xc8,
+ 0xc1, 0xd0, 0xd3, 0xb9, 0x20, 0xcd, 0x38, 0x64, 0x93, 0xea, 0x07, 0xeb, 0x1d, 0x4f, 0xc9, 0xbe,
+ 0x5e, 0xcf, 0xf7, 0xf4, 0xcb, 0xb7, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x62, 0xcd, 0x5b, 0x7c,
+ 0x99, 0x01, 0x00, 0x00,
}
diff --git a/vpython/api/vpython/env.proto b/vpython/api/vpython/env.proto
index 5ad6c28..544bfff 100644
--- a/vpython/api/vpython/env.proto
+++ b/vpython/api/vpython/env.proto
@@ -19,7 +19,7 @@
Runtime runtime = 2;
// The PEP425 tags that were probed for this Python environment.
- repeated vpython.Pep425Tag pep425_tag = 3;
+ repeated vpython.PEP425Tag pep425_tag = 3;
}
diff --git a/vpython/api/vpython/pep425.pb.go b/vpython/api/vpython/pep425.pb.go
index 09e2625..ddaf119 100644
--- a/vpython/api/vpython/pep425.pb.go
+++ b/vpython/api/vpython/pep425.pb.go
@@ -13,45 +13,45 @@
var _ = fmt.Errorf
var _ = math.Inf
-// Represnets a Python PEP425 tag.
-type Pep425Tag struct {
- // Version is the PEP425 version tag (e.g., "cp27").
- Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
- // ABI is the PEP425 ABI tag (e.g., "cp27mu", "none").
+// Represents a Python PEP425 tag.
+type PEP425Tag struct {
+ // Python is the PEP425 python tag (e.g., "cp27").
+ Python string `protobuf:"bytes,1,opt,name=python" json:"python,omitempty"`
+ // ABI is the PEP425 "python ABI" tag (e.g., "cp27mu", "none").
Abi string `protobuf:"bytes,2,opt,name=abi" json:"abi,omitempty"`
- // Arch is the PEP425 architecture tag (e.g., "linux_x86_64", "armv7l",
- // "any").
- Arch string `protobuf:"bytes,3,opt,name=arch" json:"arch,omitempty"`
+ // Platform is the PEP425 "python platform" tag (e.g., "linux_x86_64",
+ // "armv7l", "any").
+ Platform string `protobuf:"bytes,3,opt,name=platform" json:"platform,omitempty"`
}
-func (m *Pep425Tag) Reset() { *m = Pep425Tag{} }
-func (m *Pep425Tag) String() string { return proto.CompactTextString(m) }
-func (*Pep425Tag) ProtoMessage() {}
-func (*Pep425Tag) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
+func (m *PEP425Tag) Reset() { *m = PEP425Tag{} }
+func (m *PEP425Tag) String() string { return proto.CompactTextString(m) }
+func (*PEP425Tag) ProtoMessage() {}
+func (*PEP425Tag) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
-func (m *Pep425Tag) GetVersion() string {
+func (m *PEP425Tag) GetPython() string {
if m != nil {
- return m.Version
+ return m.Python
}
return ""
}
-func (m *Pep425Tag) GetAbi() string {
+func (m *PEP425Tag) GetAbi() string {
if m != nil {
return m.Abi
}
return ""
}
-func (m *Pep425Tag) GetArch() string {
+func (m *PEP425Tag) GetPlatform() string {
if m != nil {
- return m.Arch
+ return m.Platform
}
return ""
}
func init() {
- proto.RegisterType((*Pep425Tag)(nil), "vpython.Pep425Tag")
+ proto.RegisterType((*PEP425Tag)(nil), "vpython.PEP425Tag")
}
func init() {
@@ -59,14 +59,14 @@
}
var fileDescriptor1 = []byte{
- // 136 bytes of a gzipped FileDescriptorProto
+ // 138 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x48, 0xcf, 0x2c, 0xc9,
0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x29, 0x4d, 0xce, 0x04, 0x13, 0xba, 0xe9, 0xf9,
0xfa, 0x65, 0x05, 0x95, 0x25, 0x19, 0xf9, 0x79, 0xfa, 0x89, 0x05, 0x99, 0x70, 0x76, 0x41, 0x6a,
- 0x81, 0x89, 0x91, 0xa9, 0x5e, 0x41, 0x51, 0x7e, 0x49, 0xbe, 0x10, 0x3b, 0x54, 0x54, 0xc9, 0x9b,
- 0x8b, 0x33, 0x00, 0x2c, 0x11, 0x92, 0x98, 0x2e, 0x24, 0xc1, 0xc5, 0x5e, 0x96, 0x5a, 0x54, 0x9c,
- 0x99, 0x9f, 0x27, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe3, 0x0a, 0x09, 0x70, 0x31, 0x27,
- 0x26, 0x65, 0x4a, 0x30, 0x81, 0x45, 0x41, 0x4c, 0x21, 0x21, 0x2e, 0x96, 0xc4, 0xa2, 0xe4, 0x0c,
- 0x09, 0x66, 0xb0, 0x10, 0x98, 0x9d, 0xc4, 0x06, 0x36, 0xdc, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff,
- 0x17, 0x39, 0x2f, 0x5f, 0x98, 0x00, 0x00, 0x00,
+ 0x81, 0x89, 0x91, 0xa9, 0x5e, 0x41, 0x51, 0x7e, 0x49, 0xbe, 0x10, 0x3b, 0x54, 0x54, 0x29, 0x90,
+ 0x8b, 0x33, 0xc0, 0x35, 0xc0, 0xc4, 0xc8, 0x34, 0x24, 0x31, 0x5d, 0x48, 0x8c, 0x8b, 0x0d, 0x22,
+ 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe5, 0x09, 0x09, 0x70, 0x31, 0x27, 0x26, 0x65,
+ 0x4a, 0x30, 0x81, 0x05, 0x41, 0x4c, 0x21, 0x29, 0x2e, 0x8e, 0x82, 0x9c, 0xc4, 0x92, 0xb4, 0xfc,
+ 0xa2, 0x5c, 0x09, 0x66, 0xb0, 0x30, 0x9c, 0x9f, 0xc4, 0x06, 0xb6, 0xc2, 0x18, 0x10, 0x00, 0x00,
+ 0xff, 0xff, 0x54, 0x7c, 0x40, 0x1b, 0x9e, 0x00, 0x00, 0x00,
}
diff --git a/vpython/api/vpython/pep425.proto b/vpython/api/vpython/pep425.proto
index 803b456..c721a80 100644
--- a/vpython/api/vpython/pep425.proto
+++ b/vpython/api/vpython/pep425.proto
@@ -6,13 +6,13 @@
package vpython;
-// Represnets a Python PEP425 tag.
-message Pep425Tag {
- // Version is the PEP425 version tag (e.g., "cp27").
- string version = 1;
- // ABI is the PEP425 ABI tag (e.g., "cp27mu", "none").
+// Represents a Python PEP425 tag.
+message PEP425Tag {
+ // Python is the PEP425 python tag (e.g., "cp27").
+ string python = 1;
+ // ABI is the PEP425 "python ABI" tag (e.g., "cp27mu", "none").
string abi = 2;
- // Arch is the PEP425 architecture tag (e.g., "linux_x86_64", "armv7l",
- // "any").
- string arch = 3;
+ // Platform is the PEP425 "python platform" tag (e.g., "linux_x86_64",
+ // "armv7l", "any").
+ string platform = 3;
}
diff --git a/vpython/api/vpython/spec.pb.go b/vpython/api/vpython/spec.pb.go
index faa7e18..be9c77f 100644
--- a/vpython/api/vpython/spec.pb.go
+++ b/vpython/api/vpython/spec.pb.go
@@ -40,7 +40,7 @@
// environment parameters. However, a given specification may offer its own
// set of PEP425 tags representing the systems that it wants to be verified
// against.
- VerifyPep425Tag []*Pep425Tag `protobuf:"bytes,4,rep,name=verify_pep425_tag,json=verifyPep425Tag" json:"verify_pep425_tag,omitempty"`
+ VerifyPep425Tag []*PEP425Tag `protobuf:"bytes,4,rep,name=verify_pep425_tag,json=verifyPep425Tag" json:"verify_pep425_tag,omitempty"`
}
func (m *Spec) Reset() { *m = Spec{} }
@@ -69,7 +69,7 @@
return nil
}
-func (m *Spec) GetVerifyPep425Tag() []*Pep425Tag {
+func (m *Spec) GetVerifyPep425Tag() []*PEP425Tag {
if m != nil {
return m.VerifyPep425Tag
}
@@ -98,7 +98,7 @@
// (partial), that field will not be considered. For example, if a match
// tag specifies just an ABI field, any system PEP425 tag with that ABI will
// be considered a successful match, regardless of other field values.
- MatchTag []*Pep425Tag `protobuf:"bytes,3,rep,name=match_tag,json=matchTag" json:"match_tag,omitempty"`
+ MatchTag []*PEP425Tag `protobuf:"bytes,3,rep,name=match_tag,json=matchTag" json:"match_tag,omitempty"`
}
func (m *Spec_Package) Reset() { *m = Spec_Package{} }
@@ -120,7 +120,7 @@
return ""
}
-func (m *Spec_Package) GetMatchTag() []*Pep425Tag {
+func (m *Spec_Package) GetMatchTag() []*PEP425Tag {
if m != nil {
return m.MatchTag
}
@@ -137,22 +137,22 @@
}
var fileDescriptor2 = []byte{
- // 264 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xcf, 0x4a, 0xc4, 0x30,
- 0x10, 0xc6, 0xe9, 0x1f, 0xad, 0x3b, 0xa2, 0xe2, 0x80, 0x50, 0xf6, 0x54, 0x04, 0x61, 0x41, 0x6c,
- 0x61, 0x75, 0xc5, 0x93, 0xcf, 0xb0, 0xd4, 0xc5, 0x6b, 0xc9, 0x86, 0x31, 0x0d, 0xb6, 0x4d, 0xe8,
- 0xa6, 0x91, 0x7d, 0x36, 0x5f, 0x4e, 0x4c, 0xba, 0xc5, 0xcb, 0x1e, 0xbc, 0x84, 0xc9, 0x37, 0xdf,
- 0xfc, 0xbe, 0x4c, 0xe0, 0x59, 0x48, 0x53, 0x0f, 0xdb, 0x9c, 0xab, 0xb6, 0x68, 0x06, 0x2e, 0xdd,
- 0xf1, 0x20, 0x54, 0x61, 0xf5, 0xde, 0xd4, 0xaa, 0x2b, 0x98, 0x96, 0x53, 0xbd, 0xd3, 0xc4, 0x73,
- 0xdd, 0x2b, 0xa3, 0x30, 0x19, 0xb5, 0xf9, 0xcb, 0x7f, 0x00, 0x9a, 0xf4, 0xd3, 0x72, 0xe5, 0x11,
- 0xb7, 0xdf, 0x21, 0xc4, 0x6f, 0x9a, 0x38, 0xde, 0xc1, 0xa5, 0xef, 0x57, 0x96, 0xfa, 0x9d, 0x54,
- 0x5d, 0x1a, 0x64, 0xc1, 0x62, 0x56, 0x5e, 0x78, 0xf5, 0xdd, 0x8b, 0x78, 0x0f, 0x27, 0x5f, 0x35,
- 0x51, 0x93, 0x86, 0x59, 0xb4, 0x38, 0x5f, 0xde, 0xe4, 0x23, 0x35, 0xff, 0x85, 0xe4, 0x6b, 0xc6,
- 0x3f, 0x99, 0xa0, 0xd2, 0x7b, 0x70, 0x05, 0x60, 0x65, 0x6f, 0x06, 0xd6, 0x50, 0x67, 0xd3, 0x28,
- 0x0b, 0x8e, 0x4f, 0xfc, 0x31, 0xe2, 0x2b, 0x5c, 0x5b, 0xea, 0xe5, 0xc7, 0xbe, 0xf2, 0x4f, 0xad,
- 0x0c, 0x13, 0x69, 0xec, 0xf2, 0x70, 0x9a, 0x5e, 0xbb, 0xd6, 0x86, 0x89, 0xf2, 0xca, 0x9b, 0x27,
- 0x61, 0x5e, 0x43, 0x32, 0x62, 0x11, 0x21, 0xee, 0x58, 0x4b, 0xe3, 0x2e, 0xae, 0xc6, 0x14, 0x92,
- 0xc3, 0x8a, 0xa1, 0x93, 0x0f, 0x57, 0x2c, 0x60, 0xd6, 0x32, 0xc3, 0x6b, 0x17, 0x18, 0x1d, 0x0d,
- 0x3c, 0x73, 0xa6, 0x0d, 0x13, 0xdb, 0x53, 0xf7, 0x89, 0x8f, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff,
- 0xb3, 0xe0, 0x12, 0xd4, 0xc1, 0x01, 0x00, 0x00,
+ // 270 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00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, 0x70, 0x14, 0x1f, 0xbb, 0xc6, 0x7d, 0xb5,
+ 0xd1, 0x94, 0xc7, 0xa1, 0xcd, 0x23, 0x87, 0xee, 0xf2, 0xb5, 0x5c, 0xe7, 0x45, 0x4d, 0x79, 0x75,
+ 0xe5, 0xcc, 0xa5, 0xf5, 0xd6, 0x94, 0x2f, 0x5b, 0x88, 0x66, 0x2c, 0x21, 0x10, 0x0e, 0xb4, 0xc7,
+ 0x79, 0x16, 0x5b, 0x93, 0x18, 0xa2, 0xfd, 0x88, 0xbe, 0x95, 0xf7, 0x57, 0x92, 0xc1, 0xa2, 0xa7,
+ 0x9a, 0xb5, 0x36, 0x30, 0x38, 0x1a, 0x78, 0x66, 0x4d, 0x35, 0xe5, 0x9b, 0x53, 0xbb, 0xc4, 0xc7,
+ 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcf, 0xe6, 0x2e, 0x37, 0xc1, 0x01, 0x00, 0x00,
}
diff --git a/vpython/api/vpython/spec.proto b/vpython/api/vpython/spec.proto
index ddc366c..0518186 100644
--- a/vpython/api/vpython/spec.proto
+++ b/vpython/api/vpython/spec.proto
@@ -49,7 +49,7 @@
// (partial), that field will not be considered. For example, if a match
// tag specifies just an ABI field, any system PEP425 tag with that ABI will
// be considered a successful match, regardless of other field values.
- repeated vpython.Pep425Tag match_tag = 3;
+ repeated vpython.PEP425Tag match_tag = 3;
}
repeated Package wheel = 2;
@@ -65,5 +65,5 @@
// environment parameters. However, a given specification may offer its own
// set of PEP425 tags representing the systems that it wants to be verified
// against.
- repeated vpython.Pep425Tag verify_pep425_tag = 4;
+ repeated vpython.PEP425Tag verify_pep425_tag = 4;
}
diff --git a/vpython/api/vpython/util.go b/vpython/api/vpython/util.go
index c4f9e2b..3986a35 100644
--- a/vpython/api/vpython/util.go
+++ b/vpython/api/vpython/util.go
@@ -15,7 +15,7 @@
//
// 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 @@
}
// 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
diff --git a/vpython/application/application.go b/vpython/application/application.go
index 5cd6f16..ded8af1 100644
--- a/vpython/application/application.go
+++ b/vpython/application/application.go
@@ -102,7 +102,7 @@
// verification scenarios.
//
// If nil, verification will only include the validation of the spec protobuf.
- WithVerificationConfig func(context.Context, func(Config, []*vpythonAPI.Pep425Tag) error) error
+ WithVerificationConfig func(context.Context, func(Config, []*vpythonAPI.PEP425Tag) error) error
}
type application struct {
diff --git a/vpython/application/subcommand_verify.go b/vpython/application/subcommand_verify.go
index 08998af..47e7e50 100644
--- a/vpython/application/subcommand_verify.go
+++ b/vpython/application/subcommand_verify.go
@@ -62,7 +62,7 @@
// Run our Verification generator and verify each generated environment.
if a.WithVerificationConfig != nil {
- err := a.WithVerificationConfig(c, func(cfg Config, verificationScenarios []*vpython.Pep425Tag) error {
+ err := a.WithVerificationConfig(c, func(cfg Config, verificationScenarios []*vpython.PEP425Tag) error {
if len(s.VerifyPep425Tag) > 0 {
verificationScenarios = s.VerifyPep425Tag
}
@@ -75,7 +75,7 @@
// Create a verification environment to pass to our package loader.
e := vpython.Environment{
Spec: s.Clone(),
- Pep425Tag: []*vpython.Pep425Tag{vs},
+ Pep425Tag: []*vpython.PEP425Tag{vs},
}
if err := spec.NormalizeEnvironment(&e); err != nil {
logging.Errorf(c, "Failed to normalize environment against %q: %s", vs.TagString(), err)
diff --git a/vpython/cipd/pep425.go b/vpython/cipd/pep425.go
index 58b8255..8f33d18 100644
--- a/vpython/cipd/pep425.go
+++ b/vpython/cipd/pep425.go
@@ -13,9 +13,9 @@
// PlatformForPEP425Tag returns the CIPD platform inferred from a given Python
// PEP425 tag.
//
-// If the platform could not be determined, an empoty string will be returned.
-func PlatformForPEP425Tag(t *vpython.Pep425Tag) string {
- switch archSplit := strings.SplitN(t.Arch, "_", 2); archSplit[0] {
+// If the platform could not be determined, an empty string will be returned.
+func PlatformForPEP425Tag(t *vpython.PEP425Tag) string {
+ switch platSplit := strings.SplitN(t.Platform, "_", 2); platSplit[0] {
case "linux", "manylinux1":
// Grab the remainder.
//
@@ -24,8 +24,8 @@
// - manylinux1_x86_64
// - linux_arm64
cpu := ""
- if len(archSplit) > 1 {
- cpu = archSplit[1]
+ if len(platSplit) > 1 {
+ cpu = platSplit[1]
}
switch cpu {
case "i686":
@@ -52,10 +52,10 @@
// Examples:
// - macosx_10_10_intel
// - macosx_10_10_i386
- if len(archSplit) == 1 {
+ if len(platSplit) == 1 {
return ""
}
- suffixSplit := strings.SplitN(archSplit[1], "_", -1)
+ suffixSplit := strings.SplitN(platSplit[1], "_", -1)
switch suffixSplit[len(suffixSplit)-1] {
case "intel", "x86_64", "fat64", "universal":
return "mac-amd64"
@@ -71,10 +71,10 @@
case "win":
// Examples:
// - win_amd64
- if len(archSplit) == 1 {
+ if len(platSplit) == 1 {
return ""
}
- switch archSplit[1] {
+ switch platSplit[1] {
case "amd64":
return "windows-amd64"
default:
diff --git a/vpython/cipd/pep425_test.go b/vpython/cipd/pep425_test.go
index 46ef7d5..0e88f4c 100644
--- a/vpython/cipd/pep425_test.go
+++ b/vpython/cipd/pep425_test.go
@@ -13,11 +13,11 @@
. "github.com/smartystreets/goconvey/convey"
)
-func mkTag(arch string) *vpython.Pep425Tag {
- return &vpython.Pep425Tag{
- Version: "cp27",
- Abi: "none",
- Arch: arch,
+func mkTag(plat string) *vpython.PEP425Tag {
+ return &vpython.PEP425Tag{
+ Python: "cp27",
+ Abi: "none",
+ Platform: plat,
}
}
@@ -25,7 +25,7 @@
t.Parallel()
testCases := []struct {
- tag *vpython.Pep425Tag
+ tag *vpython.PEP425Tag
platform string
}{
{mkTag("junk_i686"), ""},
diff --git a/vpython/spec/match.go b/vpython/spec/match.go
index 0386905..0ea209b 100644
--- a/vpython/spec/match.go
+++ b/vpython/spec/match.go
@@ -15,7 +15,7 @@
// always match regardless of the supplied PEP425 tags.
//
// See PEP425Matches for more information.
-func PackageMatches(pkg *vpython.Spec_Package, tags []*vpython.Pep425Tag) bool {
+func PackageMatches(pkg *vpython.Spec_Package, tags []*vpython.PEP425Tag) bool {
if len(pkg.MatchTag) == 0 {
return true
}
@@ -32,20 +32,20 @@
//
// A match is determined if the non-zero fields in match equal the equivalent
// fields in a tag.
-func PEP425Matches(match *vpython.Pep425Tag, tags []*vpython.Pep425Tag) bool {
+func PEP425Matches(match *vpython.PEP425Tag, tags []*vpython.PEP425Tag) bool {
// Special case: empty match matches nothing.
if match.IsZero() {
return false
}
for _, tag := range tags {
- if v := match.Version; v != "" && tag.Version != v {
+ if v := match.Python; v != "" && tag.Python != v {
continue
}
if v := match.Abi; v != "" && tag.Abi != v {
continue
}
- if v := match.Arch; v != "" && tag.Arch != v {
+ if v := match.Platform; v != "" && tag.Platform != v {
continue
}
return true
diff --git a/vpython/spec/match_test.go b/vpython/spec/match_test.go
index b7e9af8..1db2d96 100644
--- a/vpython/spec/match_test.go
+++ b/vpython/spec/match_test.go
@@ -14,15 +14,15 @@
. "github.com/smartystreets/goconvey/convey"
)
-func mkTag(version, abi, arch string) *vpython.Pep425Tag {
- return &vpython.Pep425Tag{
- Version: version,
- Abi: abi,
- Arch: arch,
+func mkTag(python, abi, platform string) *vpython.PEP425Tag {
+ return &vpython.PEP425Tag{
+ Python: python,
+ Abi: abi,
+ Platform: platform,
}
}
-func tagString(tags []*vpython.Pep425Tag) string {
+func tagString(tags []*vpython.PEP425Tag) string {
parts := make([]string, len(tags))
for i, tag := range tags {
parts[i] = tag.TagString()
@@ -34,23 +34,23 @@
t.Parallel()
testCases := []struct {
- tags []*vpython.Pep425Tag
- matches []*vpython.Pep425Tag
- notMatches []*vpython.Pep425Tag
+ tags []*vpython.PEP425Tag
+ matches []*vpython.PEP425Tag
+ notMatches []*vpython.PEP425Tag
}{
{
tags: nil,
- notMatches: []*vpython.Pep425Tag{
+ notMatches: []*vpython.PEP425Tag{
mkTag("", "", ""),
mkTag("cp27", "cp27mu", "manylinux1_x86_64"),
},
},
{
- tags: []*vpython.Pep425Tag{
+ tags: []*vpython.PEP425Tag{
mkTag("cp27", "cp27mu", "manylinux1_x86_64"),
mkTag("py2", "cp27m", "macosx_10_9_universal"),
},
- matches: []*vpython.Pep425Tag{
+ matches: []*vpython.PEP425Tag{
mkTag("cp27", "", ""),
mkTag("", "cp27mu", ""),
mkTag("", "", "manylinux1_x86_64"),
@@ -59,20 +59,20 @@
mkTag("", "", "macosx_10_9_universal"),
mkTag("", "cp27mu", "manylinux1_x86_64"),
},
- notMatches: []*vpython.Pep425Tag{
+ notMatches: []*vpython.PEP425Tag{
mkTag("", "", ""),
mkTag("cp27", "cp27mu", "win_amd64"),
mkTag("cp27", "cp27mu", "macosx_10_9_universal"),
},
},
{
- tags: []*vpython.Pep425Tag{
+ tags: []*vpython.PEP425Tag{
mkTag("cp27", "cp27mu", ""),
},
- matches: []*vpython.Pep425Tag{
+ matches: []*vpython.PEP425Tag{
mkTag("cp27", "cp27mu", ""),
},
- notMatches: []*vpython.Pep425Tag{
+ notMatches: []*vpython.PEP425Tag{
mkTag("", "", ""),
mkTag("cp27", "cp27mu", "otherArch"),
},
@@ -101,7 +101,7 @@
func TestPackageMatches(t *testing.T) {
t.Parallel()
- mkPkg := func(name string, tags ...*vpython.Pep425Tag) *vpython.Spec_Package {
+ mkPkg := func(name string, tags ...*vpython.PEP425Tag) *vpython.Spec_Package {
return &vpython.Spec_Package{
Name: name,
MatchTag: tags,
@@ -109,7 +109,7 @@
}
testCases := []struct {
- tags []*vpython.Pep425Tag
+ tags []*vpython.PEP425Tag
matchPkgs []*vpython.Spec_Package
notMatchPkgs []*vpython.Spec_Package
}{
@@ -124,7 +124,7 @@
},
},
{
- tags: []*vpython.Pep425Tag{
+ tags: []*vpython.PEP425Tag{
mkTag("cp27", "cp27mu", "manylinux1_x86_64"),
mkTag("py2", "cp27m", "macosx_10_9_universal"),
},
diff --git a/vpython/spec/spec.go b/vpython/spec/spec.go
index 1f8fa80..a675f32 100644
--- a/vpython/spec/spec.go
+++ b/vpython/spec/spec.go
@@ -44,7 +44,7 @@
//
// NormalizeSpec will prune any Wheel entries that don't match the specified
// tags, and will remove the match entries from any remaining Wheel entries.
-func NormalizeSpec(spec *vpython.Spec, tags []*vpython.Pep425Tag) error {
+func NormalizeSpec(spec *vpython.Spec, tags []*vpython.PEP425Tag) error {
if spec.Virtualenv != nil && len(spec.Virtualenv.MatchTag) > 0 {
// The VirtualEnv package may not specify a match tag.
spec.Virtualenv.MatchTag = nil
@@ -124,15 +124,15 @@
}.Use(i, j)
}
-type pep425TagSlice []*vpython.Pep425Tag
+type pep425TagSlice []*vpython.PEP425Tag
func (s pep425TagSlice) Len() int { return len(s) }
func (s pep425TagSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
func (s pep425TagSlice) Less(i, j int) bool {
return sortby.Chain{
- func(i, j int) bool { return s[i].Version < s[j].Version },
+ func(i, j int) bool { return s[i].Python < s[j].Python },
func(i, j int) bool { return s[i].Abi < s[j].Abi },
- func(i, j int) bool { return s[i].Arch < s[j].Arch },
+ func(i, j int) bool { return s[i].Platform < s[j].Platform },
}.Use(i, j)
}
diff --git a/vpython/spec/spec_test.go b/vpython/spec/spec_test.go
index e7fe295..1bdae24 100644
--- a/vpython/spec/spec_test.go
+++ b/vpython/spec/spec_test.go
@@ -17,18 +17,18 @@
t.Parallel()
Convey(`Test manifest generation`, t, func() {
- otherTag := &vpython.Pep425Tag{Version: "otherVersion", Abi: "otherABI", Arch: "otherArch"}
- maybeTag := &vpython.Pep425Tag{Version: "maybeVersion", Abi: "maybeABI", Arch: "maybeArch"}
+ otherTag := &vpython.PEP425Tag{Python: "otherPython", Abi: "otherABI", Platform: "otherPlatform"}
+ maybeTag := &vpython.PEP425Tag{Python: "maybePython", Abi: "maybeABI", Platform: "maybePlatform"}
pkgFoo := &vpython.Spec_Package{Name: "foo", Version: "1"}
pkgBar := &vpython.Spec_Package{Name: "bar", Version: "2"}
pkgBaz := &vpython.Spec_Package{Name: "baz", Version: "3"}
- pkgMaybe := &vpython.Spec_Package{Name: "maybe", Version: "3", MatchTag: []*vpython.Pep425Tag{
- {Version: maybeTag.Version},
+ pkgMaybe := &vpython.Spec_Package{Name: "maybe", Version: "3", MatchTag: []*vpython.PEP425Tag{
+ {Python: maybeTag.Python},
}}
env := vpython.Environment{
- Pep425Tag: []*vpython.Pep425Tag{otherTag},
+ Pep425Tag: []*vpython.PEP425Tag{otherTag},
}
var rt vpython.Runtime
@@ -37,7 +37,7 @@
So(env, ShouldResemble, vpython.Environment{
Spec: &vpython.Spec{},
Runtime: &vpython.Runtime{},
- Pep425Tag: []*vpython.Pep425Tag{otherTag},
+ Pep425Tag: []*vpython.PEP425Tag{otherTag},
})
})
@@ -51,8 +51,8 @@
Wheel: []*vpython.Spec_Package{pkgBar, pkgBaz, pkgFoo},
})
- So(Hash(env.Spec, &rt, ""), ShouldEqual, "7e80b8643051ce0d82bf44fb180687e988791cfd7f3da39861370f0a56fc80f8")
- So(Hash(env.Spec, &rt, "extra"), ShouldEqual, "140a02bb88b011d4aceafb9533266288fd4b441c3bdb70494419b3ef76457f34")
+ So(Hash(env.Spec, &rt, ""), ShouldEqual, "1e32c02610b51f8c3807203fccd3e8d01d252868d52eb4ee9df135ef6533c5ae")
+ So(Hash(env.Spec, &rt, "extra"), ShouldEqual, "d047eb021f50534c050aaa10c70dc7b4a9b511fab00cf67a191b2b0805f24420")
})
Convey(`With match tags`, func() {
diff --git a/vpython/venv/venv.go b/vpython/venv/venv.go
index 2e27fe8..0ff764e 100644
--- a/vpython/venv/venv.go
+++ b/vpython/venv/venv.go
@@ -566,7 +566,7 @@
// getPEP425Tags calls Python's pip.pep425tags package to retrieve the tags.
//
// This must be run while "pip" is installed in the VirtualEnv.
-func (e *Env) getPEP425Tags(c context.Context) ([]*vpython.Pep425Tag, error) {
+func (e *Env) getPEP425Tags(c context.Context) ([]*vpython.PEP425Tag, error) {
// This script will return a list of 3-entry lists:
// [0]: version (e.g., "cp27")
// [1]: abi (e.g., "cp27mu", "none")
@@ -594,7 +594,7 @@
Err()
}
- tags := make([]*vpython.Pep425Tag, len(tagEntries))
+ tags := make([]*vpython.PEP425Tag, len(tagEntries))
for i, te := range tagEntries {
if len(te) != 3 {
return nil, errors.Reason("invalid PEP425 tag entry: %(entry)v").
@@ -603,10 +603,10 @@
Err()
}
- tags[i] = &vpython.Pep425Tag{
- Version: te[0],
- Abi: te[1],
- Arch: te[2],
+ tags[i] = &vpython.PEP425Tag{
+ Python: te[0],
+ Abi: te[1],
+ Platform: te[2],
}
}