6 Commits

Author SHA1 Message Date
Andreas Jaeger
f4f57e0024 Handle doc/requirements.txt
Change Ief487e1d20ea20facf398367ca03a6385182fb38 updated the PTI for doc
jobs and introduces doc/requirements.txt. Support that for requirements
syncing.

Change-Id: I147a129438ae370eb4c90ee93a634fa61cc179f4
2017-11-23 20:09:01 +01:00
gengchc2
9d890b2856 Use ConfigParser instead of SafeConfigParser
in Python 3 The SafeConfigParser class has been renamed
to ConfigParser in Python 3.2 [1]. The alias SafeConfigParser
maybe removed in future versions of Python 3. Use ConfigParser
instead of SafeConfigParser in Python 3.We're switching from
SafeConfigParser to ConfigParser because we're we're not explicitly
using the 'Safe' functionality.So it make the code potentially neater
if SafeConfigParser is even de-aliased in python3.

[1] http://bugs.python.org/issue10627

Change-Id: I932ced300a93040144e89c7f4acc95480b32749d
2016-09-29 08:57:54 +00:00
Costin Galan
7bca319451 Add Windows as supported operating system
This change is necessary in order to use the project's
update-requirements.py script when preparing the environment on the
Hyper-V compute nodes used in the Hyper-V CI. Using the mentioned script
will set the latest requirements in nova, neutron, manila, etc.,
reducing the CI's amount of failures caused by outdated requirements.

Including Microsoft Windows as a supported operating system on this
project. Also, we update the edit-constraints.py and project.py
files to support os.rename() of Windows.

On Windows, os.rename() will create a file with the source
name, without deleting the initial file first.

Example of a traceback:

 Traceback (most recent call last):
   File "C:\Python27\Scripts\edit-constraints-script.py", line 9, in
 <module>
     load_entry_point('openstack.requirements==0.0.1.dev2497',
 'console_scripts', 'edit-constraints')()
   File
 "C:\Python27\lib\site-packages\openstack_requirements\cmds\edit_constraint.py",
 line 74, in main
     os.rename(args[0] + '.tmp', args[0])
 WindowsError: [Error 183] Cannot create a file when that file already exists

This could be easily solved by removing the file before the rename.

Proposed fix:
Add before "os.rename(args[0] + '.tmp', args[0])" the line "os.remove(args[0])"
in edit_constraint.py
Add before "os.rename(tmpname, fullname)" the line "os.remove(fullname)"
in project.py
Add "Operating System :: Microsoft :: Windows" in setup.cfg

DocImpact: Added Windows as a supported OS in setup.cfg
Change-Id: If123a65fd8d49d5c67a1db16827a9617ce520dba
Signed-off-by: Costin Galan <cgalan@cloudbasesolutions.com>
2016-02-26 14:25:50 +02:00
Zhao Lei
3abda1e284 Fix a little spelling typo in README and error message
s/occured/occurred/
s/occuring/occurring/

Change-Id: Iaec8aeb0ec5c2c3638146f525868b65ab943f71f
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2015-12-11 09:26:28 +00:00
Gal Sagie
97ddc985ab Add checks for setup.cfg existence in project dictionary
This check is needed by new projects at their first commit
Without this fix the following initial commit for new project
failed:
https://review.openstack.org/#/c/201701/

The exception that it failed was originated in this method
with KeyError on the project['setup.cfg'] (see previous
jenkins logs on the above commit)

Log: http://logs.openstack.org/01/201701/6/check/gate-kuryr-requirements/e922983/console.html

Change-Id: I39db2918ea277b939f67d3c856f52bd53c226f27
2015-07-15 11:08:48 +03:00
Robert Collins
50eee6fc57 Split project and requirement types out.
These don't need to be hidden within update.py anymore, and we need
them for lint and edit.

Change-Id: I92f4ff51f98f6343cc94a74a69660306b742dbf3
2015-06-29 15:27:25 +12:00