1. michilu
  2. python-amazon-product-api

Commits

Sebastian Rahlf  committed 73b1120

Added safeguard for upload and register commands.

  • Participants
  • Parent commits aa149c1
  • Branches default

Comments (0)

Files changed (1)

File setup.py

View file
         errno = subprocess.call([sys.executable, os.path.join(_here, 'tests', 'runtests.py')])
         raise SystemExit(errno)
 
+# make sure that no development version end up on PyPI
+if 'register' in sys.argv or 'upload' in sys.argv:
+    version_ = version()
+    if '/' in version_ or '+' in version_:
+        print 'ERROR: Version %r has not been adjusted yet!' % version_
+        sys.exit(1)
+
 setup(
     name = 'python-amazon-product-api',
     version = version(),