second try
[vsorcdistro/.git] / ryu / .eggs / pbr-5.3.1-py2.7.egg / pbr / extra_files.py
1 # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #    http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12 # implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 from distutils import errors
17 import os
18
19 _extra_files = []
20
21
22 def get_extra_files():
23     global _extra_files
24     return _extra_files
25
26
27 def set_extra_files(extra_files):
28     # Let's do a sanity check
29     for filename in extra_files:
30         if not os.path.exists(filename):
31             raise errors.DistutilsFileError(
32                 '%s from the extra_files option in setup.cfg does not '
33                 'exist' % filename)
34     global _extra_files
35     _extra_files[:] = extra_files[:]