`python setup.py install` with ryu tarball
(https://github.com/osrg/ryu/archive/master.tar.gz) gives the
following exception:

Traceback (most recent call last):
  File "/home/fujita/ryu-master/d2to1-0.2.10-py2.7.egg/d2to1/util.py", line 
182, in cfg_to_args
    hook_fn(config)
  File "/home/fujita/ryu-master/pbr-0.5.20-py2.7.egg/pbr/hooks/__init__.py", 
line 27, in setup_hook
    metadata_config.run()
  File "/home/fujita/ryu-master/pbr-0.5.20-py2.7.egg/pbr/hooks/base.py", line 
29, in run
    self.hook()
  File "/home/fujita/ryu-master/pbr-0.5.20-py2.7.egg/pbr/hooks/metadata.py", 
line 28, in hook
    self.config['name'], self.config.get('version', None))
  File "/home/fujita/ryu-master/pbr-0.5.20-py2.7.egg/pbr/packaging.py", line 
709, in get_version
    raise Exception("Versioning for this project requires either an sdist"
Exception: Versioning for this project requires either an sdist tarball, or 
access to an upstream git repository.

error in ryu setup command: Error parsing /home/fujita/ryu-master/setup.cfg: 
SystemExit: 1


Note that the same command with `git clone` works.

Seems that pbr doesn't expect using a tarball (I hit the same problem
with neutron). The following is a workaround for this. Let me know if
someone knows the better way.


diff --git a/setup.py b/setup.py
index a613f3f..54dc9cb 100644
--- a/setup.py
+++ b/setup.py
@@ -15,8 +15,11 @@
 # limitations under the License.
 
 import setuptools
+import os
+from ryu import version
 
 
+os.environ["PBR_VERSION"] = str(version)
 setuptools.setup(name='ryu',
                  setup_requires=['d2to1', 'pbr'],
                  d2to1=True)

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to