Repository: enthought/okonomiyaki

Issue:
Implement str(epd_platform)
Should look as follows:

```python
>>> platform = EPDPlatform.from_epd_string("rh5-64")
>>> str(platform)
rh5_x86_64
```

Discussion:

Patch:
diff --git a/CHANGELOG b/CHANGELOG
index da8cdd4..74c7922 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,8 @@ Improvements:
   * SemanticVersion class added
   * MetadataVersion class added to easily manipulate metadata versions.
   * runtime_metadata_factory function to parse and validate runtime packages.
+  * __str__ is now implemented for EPDPlatform. The implementation support
+    EPDPlatform.from_epd_string(str(epd_platform)) == epd_platform (#117)
 
 2015-00-01   0.10.0:
 --------------------
diff --git a/okonomiyaki/platforms/epd_platform.py b/okonomiyaki/platforms/epd_platform.py
index 433605a..33ab4bd 100644
--- a/okonomiyaki/platforms/epd_platform.py
+++ b/okonomiyaki/platforms/epd_platform.py
@@ -252,6 +252,9 @@ class EPDPlatform(HasTraits):
     def short(self):
         return "{0}-{1}".format(self.platform_name, self.arch_bits)
 
+    def __str__(self):
+        return "{0.platform_name}_{0.arch}".format(self)
+
     def __eq__(self, other):
         if not isinstance(other, self.__class__):
             return False


Test patch:
diff --git a/okonomiyaki/platforms/tests/test_epd_platform.py b/okonomiyaki/platforms/tests/test_epd_platform.py
index 9dfa96e..e159950 100644
--- a/okonomiyaki/platforms/tests/test_epd_platform.py
+++ b/okonomiyaki/platforms/tests/test_epd_platform.py
@@ -161,6 +161,28 @@ class TestEPDPlatform(unittest.TestCase):
             epd_platform = EPDPlatform.from_running_system("amd64")
             self.assertEqual(epd_platform.short, "rh5-64")
 
+    def test_str(self):
+        # Given
+        epd_platform = EPDPlatform.from_epd_string("rh5-64")
+
+        # When/Then
+        self.assertEqual(str(epd_platform), "rh5_x86_64")
+
+        # Given
+        epd_platform = EPDPlatform.from_epd_string("osx-32")
+
+        # When/Then
+        self.assertEqual(str(epd_platform), "osx_x86")
+
+        # Given
+        s = "osx_x86"
+
+        # When
+        epd_platform = EPDPlatform.from_epd_string(s)
+
+        # Then
+        self.assertEqual(str(epd_platform), s)
+
 
 class TestEPDPlatformApplies(unittest.TestCase):
     @mock_centos_5_8