diff --git a/NEWS b/NEWS index f49d2a9230d3291017e6cf4e298d9220aeace3c4..634c0d8b79c97d49ae4d765c4307eafc01cb7639 100644 --- a/NEWS +++ b/NEWS @@ -249,6 +249,7 @@ documents those changes that are of interest to users and admins. -- BLUEGENE - Fix for overlap mode loading blocks when midplane is in an error state. -- Add range check for SuspendTime configuration parameter. + -- Moved unzipped python-hostname tarball out and the tarball in. * Changes in SLURM 2.0.6 ======================== diff --git a/contribs/python/hostlist/CHANGES b/contribs/python/hostlist/CHANGES deleted file mode 100644 index 86f30ec84aba058c2e47355dd23698b7d3f95296..0000000000000000000000000000000000000000 --- a/contribs/python/hostlist/CHANGES +++ /dev/null @@ -1,46 +0,0 @@ -Version 1.5 (2009-02-22) - - Make each "-" on the command line count as one hostlist argument. - If multiple hostslists are given on stdin they are combined to a - union hostlist before being used in the way requested by the - options. - - Add hostgrep utility to search for lines matching a hostlist. - - Make the build system (used when building tar.gz and RPMs from the - source code held in git) smarter. - -Version 1.4 (2008-12-28) - - Support Python 3. - - Import reduce from functools if possible. - Use Python 2/3 installation trick from .../Demo/distutils/test2to3 - -Version 1.3 (2008-09-30) - - Add -s/--separator, -p/--prepend, -a/--append and --version - options contributed by Pär Andersson at NSC. - - Let -e be the short form of the --expand option (-w is now - deprecated). - - Add a manual page for hostlist(1). - -Version 1.2 (2008-09-18) - - Add "--prefix /usr" in the installation script of the spec file - (needed on SUSE Linux where the default is /usr/local). - -Version 1.1 (2008-09-17) - - Move the command line utility to a separate 'hostlist' command. - - Provide a python-hostlist.spec file to build RPM packages. - Inspired by a contribution by Dr. Holger Obermaier at - Rechenzentrum, Universität Karlsruhe. - -Version 1.0 (2008-07-25) - - Initial version. - diff --git a/contribs/python/hostlist/COPYING b/contribs/python/hostlist/COPYING deleted file mode 100644 index d511905c1647a1e311e8b20d5930a37a9c2531cd..0000000000000000000000000000000000000000 --- a/contribs/python/hostlist/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/contribs/python/hostlist/Makefile.am b/contribs/python/hostlist/Makefile.am deleted file mode 100644 index 72676f515afa567c6bb725de453fd7482d20a3dc..0000000000000000000000000000000000000000 --- a/contribs/python/hostlist/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -SUBDIRS = test - -EXTRA_DIST = \ - CHANGES \ - COPYING \ - hostlist.py \ - PKG-INFO \ - python-hostlist.spec \ - README \ - setup.py diff --git a/contribs/python/hostlist/Makefile.in b/contribs/python/hostlist/Makefile.in deleted file mode 100644 index 4427bba4bd38a32ff80a7b8316299e3d55babe87..0000000000000000000000000000000000000000 --- a/contribs/python/hostlist/Makefile.in +++ /dev/null @@ -1,597 +0,0 @@ -# Makefile.in generated by automake 1.10.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = contribs/python/hostlist -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ - $(top_srcdir)/auxdir/libtool.m4 \ - $(top_srcdir)/auxdir/ltoptions.m4 \ - $(top_srcdir)/auxdir/ltsugar.m4 \ - $(top_srcdir)/auxdir/ltversion.m4 \ - $(top_srcdir)/auxdir/lt~obsolete.m4 \ - $(top_srcdir)/auxdir/slurm.m4 \ - $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ - $(top_srcdir)/auxdir/x_ac_affinity.m4 \ - $(top_srcdir)/auxdir/x_ac_aix.m4 \ - $(top_srcdir)/auxdir/x_ac_blcr.m4 \ - $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ - $(top_srcdir)/auxdir/x_ac_cflags.m4 \ - $(top_srcdir)/auxdir/x_ac_cray.m4 \ - $(top_srcdir)/auxdir/x_ac_databases.m4 \ - $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ - $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ - $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ - $(top_srcdir)/auxdir/x_ac_gtk.m4 \ - $(top_srcdir)/auxdir/x_ac_iso.m4 \ - $(top_srcdir)/auxdir/x_ac_munge.m4 \ - $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ - $(top_srcdir)/auxdir/x_ac_pam.m4 \ - $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ - $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ - $(top_srcdir)/auxdir/x_ac_readline.m4 \ - $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ - $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ - $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ - $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ - $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ - $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTHD_CFLAGS = @AUTHD_CFLAGS@ -AUTHD_LIBS = @AUTHD_LIBS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BG_INCLUDES = @BG_INCLUDES@ -BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ -BLCR_HOME = @BLCR_HOME@ -BLCR_LDFLAGS = @BLCR_LDFLAGS@ -BLCR_LIBS = @BLCR_LIBS@ -BLUEGENE_LOADED = @BLUEGENE_LOADED@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMD_LDFLAGS = @CMD_LDFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ -EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ -FGREP = @FGREP@ -GREP = @GREP@ -GTK2_CFLAGS = @GTK2_CFLAGS@ -GTK2_LIBS = @GTK2_LIBS@ -HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ -HAVEPGCONFIG = @HAVEPGCONFIG@ -HAVEPKGCONFIG = @HAVEPKGCONFIG@ -HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ -HAVE_OPENSSL = @HAVE_OPENSSL@ -HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_LDFLAGS = @LIB_LDFLAGS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ -MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ -MUNGE_LIBS = @MUNGE_LIBS@ -MYSQL_CFLAGS = @MYSQL_CFLAGS@ -MYSQL_LIBS = @MYSQL_LIBS@ -NCURSES = @NCURSES@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NUMA_LIBS = @NUMA_LIBS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_LIBS = @PAM_LIBS@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PGSQL_CFLAGS = @PGSQL_CFLAGS@ -PGSQL_LIBS = @PGSQL_LIBS@ -PLPA_LIBS = @PLPA_LIBS@ -PROCTRACKDIR = @PROCTRACKDIR@ -PROJECT = @PROJECT@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -READLINE_LIBS = @READLINE_LIBS@ -RELEASE = @RELEASE@ -SED = @SED@ -SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ -SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLURMCTLD_PORT = @SLURMCTLD_PORT@ -SLURMDBD_PORT = @SLURMDBD_PORT@ -SLURMD_PORT = @SLURMD_PORT@ -SLURM_API_AGE = @SLURM_API_AGE@ -SLURM_API_CURRENT = @SLURM_API_CURRENT@ -SLURM_API_MAJOR = @SLURM_API_MAJOR@ -SLURM_API_REVISION = @SLURM_API_REVISION@ -SLURM_API_VERSION = @SLURM_API_VERSION@ -SLURM_MAJOR = @SLURM_MAJOR@ -SLURM_MICRO = @SLURM_MICRO@ -SLURM_MINOR = @SLURM_MINOR@ -SLURM_PREFIX = @SLURM_PREFIX@ -SLURM_VERSION = @SLURM_VERSION@ -SO_LDFLAGS = @SO_LDFLAGS@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LDFLAGS = @SSL_LDFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -UTIL_LIBS = @UTIL_LIBS@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = test -EXTRA_DIST = \ - CHANGES \ - COPYING \ - hostlist.py \ - PKG-INFO \ - python-hostlist.spec \ - README \ - setup.py - -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contribs/python/hostlist/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu contribs/python/hostlist/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/contribs/python/hostlist/PKG-INFO b/contribs/python/hostlist/PKG-INFO deleted file mode 100644 index f66980ccb6add624183e107b75a7121e52ec9f39..0000000000000000000000000000000000000000 --- a/contribs/python/hostlist/PKG-INFO +++ /dev/null @@ -1,18 +0,0 @@ -Metadata-Version: 1.0 -Name: python-hostlist -Version: 1.5 -Summary: Python module for hostlist handling -Home-page: http://www.nsc.liu.se/~kent/python-hostlist/ -Author: Kent Engström -Author-email: kent@nsc.liu.se -License: GPL2+ -Description: The hostlist.py module knows how to expand and collect hostlist expressions. -Platform: UNKNOWN -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Science/Research -Classifier: Intended Audience :: System Administrators -Classifier: License :: OSI Approved :: GNU General Public License (GPL) -Classifier: Topic :: System :: Clustering -Classifier: Topic :: System :: Systems Administration -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 3 diff --git a/contribs/python/hostlist/README b/contribs/python/hostlist/README deleted file mode 100644 index ebb9d52780a5d0de5bf0393b6aca511c544a499b..0000000000000000000000000000000000000000 --- a/contribs/python/hostlist/README +++ /dev/null @@ -1,67 +0,0 @@ -INTRODUCTION -============ - -The Python module hostlist.py knows how to expand and collect hostlist -expressions. Example: - - % python - Python 2.5.1 (r251:54863, Jul 10 2008, 17:24:48) - [GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2 - Type "help", "copyright", "credits" or "license" for more information. - >>> import hostlist - >>> hosts = hostlist.expand_hostlist("n[1-10,17]") - >>> hosts - ['n1', 'n2', 'n3', 'n4', 'n5', 'n6', 'n7', 'n8', 'n9', 'n10', 'n17'] - >>> hostlist.collect_hostlist(hosts) - 'n[1-10,17]' - >>> hostlist.collect_hostlist(["x1y1","x2y2", "x1y2", "x2y1"]) - 'x[1-2]y[1-2]' - -Bad hostlists or hostnames will result in the hostlist.BadHostlist -exception being raised. - -The 'hostlist' command is provided to expand/collect hostlists and -perform set operations on them. Example: - - % hostlist n[1-10] n[5-20] - n[1-20] - % hostlist --difference n[1-10] n[5-20] - n[1-4] - % hostlist --expand --intersection n[1-10] n[5-20] - n5 - n6 - n7 - n8 - n9 - n10 - - -BUILDING -======== - -Build RPM packages from the tar.gz archive by running: - - rpmbuild -ta python-hostlist-1.5.tar.gz - -If you do not have the tar archive, create it first: - - python setup.py sdist - rpmbuild -ta dist/python-hostlist-1.5.tar.gz - -You may also install directly by running: - - python setup.py build (as yourself) - python setup.py install (as root) - - -RELEASES AND FEEDBACK -===================== - -You will find new releases at: - - http://www.nsc.liu.se/~kent/python-hostlist/ - -If you have questions, suggestions, bug reports or patches, please -send them to: - - kent@nsc.liu.se. diff --git a/contribs/python/hostlist/hostlist.py b/contribs/python/hostlist/hostlist.py deleted file mode 100755 index b3b520336261c19eec0b8c7f25dce3bf50d3bcde..0000000000000000000000000000000000000000 --- a/contribs/python/hostlist/hostlist.py +++ /dev/null @@ -1,362 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# Hostlist library -# -# Copyright (C) 2008 Kent Engström <kent@nsc.liu.se>, -# Thomas Bellman <bellman@nsc.liu.se> and -# Pär Andersson <paran@nsc.liu.se>, -# National Supercomputer Centre -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -"""Handle hostlist expressions. - -This module provides operations to expand and collect hostlist -expressions. - -The hostlist expression syntax is the same as in several programs -developed at LLNL (https://computing.llnl.gov/linux/). However in -corner cases the behaviour of this module have not been compared for -compatibility with pdsh/dshbak/SLURM et al. -""" - -__version__ = "1.5" - -import re -import itertools - -# Exception used for error reporting to the caller -class BadHostlist(Exception): pass - -# Configuration to guard against ridiculously long expanded lists -MAX_SIZE = 100000 - -# Hostlist expansion - -def expand_hostlist(hostlist, allow_duplicates=False, sort=False): - """Expand a hostlist expression string to a Python list. - - Example: expand_hostlist("n[9-11],d[01-02]") ==> - ['n9', 'n10', 'n11', 'd01', 'd02'] - - Unless allow_duplicates is true, duplicates will be purged - from the results. If sort is true, the output will be sorted. - """ - - results = [] - bracket_level = 0 - part = "" - - for c in hostlist + ",": - if c == "," and bracket_level == 0: - # Comma at top level, split! - if part: results.extend(expand_part(part)) - part = "" - bad_part = False - else: - part += c - - if c == "[": bracket_level += 1 - elif c == "]": bracket_level -= 1 - - if bracket_level > 1: - raise BadHostlist, "nested brackets" - elif bracket_level < 0: - raise BadHostlist, "unbalanced brackets" - - if bracket_level > 0: - raise BadHostlist, "unbalanced brackets" - - if not allow_duplicates: - results = remove_duplicates(results) - if sort: - results = numerically_sorted(results) - return results - -def expand_part(s): - """Expand a part (e.g. "x[1-2]y[1-3][1-3]") (no outer level commas).""" - - # Base case: the empty part expand to the singleton list of "" - if s == "": - return [""] - - # Split into: - # 1) prefix string (may be empty) - # 2) rangelist in brackets (may be missing) - # 3) the rest - - m = re.match(r'([^,\[]*)(\[[^\]]*\])?(.*)', s) - (prefix, rangelist, rest) = m.group(1,2,3) - - # Expand the rest first (here is where we recurse!) - rest_expanded = expand_part(rest) - - # Expand our own part - if not rangelist: - # If there is no rangelist, our own contribution is the prefix only - us_expanded = [prefix] - else: - # Otherwise expand the rangelist (adding the prefix before) - us_expanded = expand_rangelist(prefix, rangelist[1:-1]) - - # Combine our list with the list from the expansion of the rest - # (but guard against too large results first) - if len(us_expanded) * len(rest_expanded) > MAX_SIZE: - raise BadHostlist, "results too large" - - return [us_part + rest_part - for us_part in us_expanded - for rest_part in rest_expanded] - -def expand_rangelist(prefix, rangelist): - """ Expand a rangelist (e.g. "1-10,14"), putting a prefix before.""" - - # Split at commas and expand each range separately - results = [] - for range_ in rangelist.split(","): - results.extend(expand_range(prefix, range_)) - return results - -def expand_range(prefix, range_): - """ Expand a range (e.g. 1-10 or 14), putting a prefix before.""" - - # Check for a single number first - m = re.match(r'^[0-9]+$', range_) - if m: - return ["%s%s" % (prefix, range_)] - - # Otherwise split low-high - m = re.match(r'^([0-9]+)-([0-9]+)$', range_) - if not m: - raise BadHostlist, "bad range" - - (s_low, s_high) = m.group(1,2) - low = int(s_low) - high = int(s_high) - width = len(s_low) - - if high < low: - raise BadHostlist, "start > stop" - elif high - low > MAX_SIZE: - raise BadHostlist, "range too large" - - results = [] - for i in xrange(low, high+1): - results.append("%s%0*d" % (prefix, width, i)) - return results - -def remove_duplicates(l): - """Remove duplicates from a list (but keep the order).""" - seen = set() - results = [] - for e in l: - if e not in seen: - results.append(e) - seen.add(e) - return results - -# Hostlist collection - -def collect_hostlist(hosts, silently_discard_bad = False): - """Collect a hostlist string from a Python list of hosts. - - We start grouping from the rightmost numerical part. - Duplicates are removed. - - A bad hostname raises an exception (unless silently_discard_bad - is true causing the bad hostname to be silently discarded instead). - """ - - # Split hostlist into a list of (host, "") for the iterative part. - # (Also check for bad node names now) - # The idea is to move already collected numerical parts from the - # left side (seen by each loop) to the right side (just copied). - - left_right = [] - for host in hosts: - # We remove leading and trailing whitespace first, and skip empty lines - host = host.strip() - if host == "": continue - - # We cannot accept a host containing any of the three special - # characters in the hostlist syntax (comma and flat brackets) - if re.search(r'[][,]', host): - if silently_discard_bad: - continue - else: - raise BadHostlist, "forbidden character" - - left_right.append((host, "")) - - # Call the iterative function until it says it's done - looping = True - while looping: - left_right, looping = collect_hostlist_1(left_right) - return ",".join([left + right for left, right in left_right]) - -def collect_hostlist_1(left_right): - """Collect a hostlist string from a list of hosts (left+right). - - The input is a list of tuples (left, right). The left part - is analyzed, while the right part is just passed along - (it can contain already collected range expressions). - """ - - # Scan the list of hosts (left+right) and build two things: - # *) a set of all hosts seen (used later) - # *) a list where each host entry is preprocessed for correct sorting - - sortlist = [] - remaining = set() - for left, right in left_right: - host = left + right - remaining.add(host) - - # Match the left part into parts - m = re.match(r'^(.*?)([0-9]+)?([^0-9]*)$', left) - (prefix, num_str, suffix) = m.group(1,2,3) - - # Add the right part unprocessed to the suffix. - # This ensures than an already computed range expression - # in the right part is not analyzed again. - suffix = suffix + right - - if num_str is None: - # A left part with no numeric part at all gets special treatment! - # The regexp matches with the whole string as the suffix, - # with nothing in the prefix or numeric parts. - # We do not want that, so we move it to the prefix and put - # None as a special marker where the suffix should be. - assert prefix == "" - sortlist.append(((host, None), None, None, host)) - else: - # A left part with at least an numeric part - # (we care about the rightmost numeric part) - num_int = int(num_str) - num_width = len(num_str) # This width includes leading zeroes - sortlist.append(((prefix, suffix), num_int, num_width, host)) - - # Sort lexicographically, first on prefix, then on suffix, then on - # num_int (numerically), then... - # This determines the order of the final result. - - sortlist.sort() - - # We are ready to collect the result parts as a list of new (left, - # right) tuples. - - results = [] - needs_another_loop = False - - # Now group entries with the same prefix+suffix combination (the - # key is the first element in the sortlist) to loop over them and - # then to loop over the list of hosts sharing the same - # prefix+suffix combination. - - for ((prefix, suffix), group) in itertools.groupby(sortlist, - key=lambda x:x[0]): - - if suffix is None: - # Special case: a host with no numeric part - results.append(("", prefix)) # Move everything to the right part - remaining.remove(prefix) - else: - # The general case. We prepare to collect a list of - # ranges expressed as (low, high, width) for later - # formatting. - range_list = [] - - for ((prefix2, suffix2), num_int, num_width, host) in group: - if host not in remaining: - # Below, we will loop internally to enumate a whole range - # at a time. We then remove the covered hosts from the set. - # Therefore, skip the host here if it is gone from the set. - continue - assert num_int is not None - - # Scan for a range starting at the current host - low = num_int - while True: - host = "%s%0*d%s" % (prefix, num_width, num_int, suffix) - if host in remaining: - remaining.remove(host) - num_int += 1 - else: - break - high = num_int - 1 - assert high >= low - range_list.append((low, high, num_width)) - - # We have a list of ranges to format. We make sure - # we move our handled numerical part to the right to - # stop it from being processed again. - needs_another_loop = True - if len(range_list) == 1 and range_list[0][0] == range_list[0][1]: - # Special case to make sure that n1 is not shown as n[1] etc - results.append((prefix, - "%0*d%s" % - (range_list[0][2], range_list[0][0], suffix))) - else: - # General case where high > low - results.append((prefix, "[" + \ - ",".join([format_range(l, h, w) - for l, h, w in range_list]) + \ - "]" + suffix)) - - # At this point, the set of remaining hosts should be empty and we - # are ready to return the result, together with the flag that says - # if we need to loop again (we do if we have added something to a - # left part). - assert not remaining - return results, needs_another_loop - -def format_range(low, high, width): - """Format a range from low to high inclusively, with a certain width.""" - - if low == high: - return "%0*d" % (width, low) - else: - return "%0*d-%0*d" % (width, low, width, high) - -# Sort a list of hosts numerically - -def numerically_sorted(l): - """Sort a list of hosts numerically. - - E.g. sorted order should be n1, n2, n10; not n1, n10, n2. - """ - - return sorted(l, key=numeric_sort_key) - -def int_if_possible(x): - try: - return int(x) - except: - return x - -def numeric_sort_key(x): - return [int_if_possible(n) for n in re.findall("([0-9]+|[^0-9]+)", x)] - - -# -# Keep this part to tell users where the command line interface went -# - -if __name__ == '__main__': - import os, sys - sys.stderr.write("The command line utility has been moved to a separate 'hostlist' program.\n") - sys.exit(os.EX_USAGE) diff --git a/contribs/python/hostlist/python-hostlist-1.6.tar.gz b/contribs/python/hostlist/python-hostlist-1.6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..82faea290b2ca0355ade5c5e27a451d1fa012580 Binary files /dev/null and b/contribs/python/hostlist/python-hostlist-1.6.tar.gz differ diff --git a/contribs/python/hostlist/python-hostlist.spec b/contribs/python/hostlist/python-hostlist.spec deleted file mode 100644 index 9c2ce0df12ed3831f0beaf596e8689d169ffecb3..0000000000000000000000000000000000000000 --- a/contribs/python/hostlist/python-hostlist.spec +++ /dev/null @@ -1,51 +0,0 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} - -Name: python-hostlist -Version: 1.5 -Release: 1 -Summary: Python module for hostlist handling -Vendor: NSC - -Group: Development/Languages -License: GPL2+ -URL: http://www.nsc.liu.se/~kent/python-hostlist/ -Source0: http://www.nsc.liu.se/~kent/python-hostlist/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildArch: noarch -BuildRequires: python-devel - -%description -The hostlist.py module knows how to expand and collect hostlist -expressions. The package also includes the 'hostlist' binary which can -be used to collect/expand hostlists and perform set operations on -them. - -%prep -%setup -q - - -%build -%{__python} setup.py build - - -%install -rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install -O1 --skip-build --prefix /usr --root $RPM_BUILD_ROOT - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc README -%doc COPYING -%doc CHANGES -%{python_sitelib}/* -/usr/bin/hostlist -/usr/bin/hostgrep -/usr/share/man/man1/hostlist.1.gz -/usr/share/man/man1/hostgrep.1.gz -%changelog diff --git a/contribs/python/hostlist/setup.py b/contribs/python/hostlist/setup.py deleted file mode 100644 index 57199e70754092c3c7552df04def48f5870914a9..0000000000000000000000000000000000000000 --- a/contribs/python/hostlist/setup.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- - -from distutils.core import setup - -# Python 2/3 installation trick from .../Demo/distutils/test2to3 -try: - from distutils.command.build_py import build_py_2to3 as build_py -except ImportError: - from distutils.command.build_py import build_py - -try: - from distutils.command.build_scripts import build_scripts_2to3 as build_scripts -except ImportError: - from distutils.command.build_scripts import build_scripts - -# Version -VERSION = "1.5" -if "#" in VERSION: - import sys - sys.stderr.write("Bad version %s\n" % VERSION) - sys.exit(1) - - -setup(name = "python-hostlist", - version = VERSION, - description = "Python module for hostlist handling", - long_description = "The hostlist.py module knows how to expand and collect hostlist expressions.", - author = "Kent Engström", - author_email = "kent@nsc.liu.se", - url = "http://www.nsc.liu.se/~kent/python-hostlist/", - license = "GPL2+", - classifiers = ['Development Status :: 5 - Production/Stable', - 'Intended Audience :: Science/Research', - 'Intended Audience :: System Administrators', - 'License :: OSI Approved :: GNU General Public License (GPL)', - 'Topic :: System :: Clustering', - 'Topic :: System :: Systems Administration', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 3', - ], - py_modules = ["hostlist"], - scripts = ["hostlist", "hostgrep"], - data_files = [("share/man/man1", ["hostlist.1", - "hostgrep.1"])], - cmdclass = {'build_py':build_py, - 'build_scripts':build_scripts, - } - ) diff --git a/contribs/python/hostlist/test/Makefile.am b/contribs/python/hostlist/test/Makefile.am deleted file mode 100644 index c795271fb0b6294ebd9c72016d66d57ac359b381..0000000000000000000000000000000000000000 --- a/contribs/python/hostlist/test/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -EXTRA_DIST = \ - test_hostlist.py diff --git a/contribs/python/hostlist/test/Makefile.in b/contribs/python/hostlist/test/Makefile.in deleted file mode 100644 index c990e183ff2f819a60e0c5517fdb2262947b009e..0000000000000000000000000000000000000000 --- a/contribs/python/hostlist/test/Makefile.in +++ /dev/null @@ -1,431 +0,0 @@ -# Makefile.in generated by automake 1.10.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = contribs/python/hostlist/test -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ - $(top_srcdir)/auxdir/libtool.m4 \ - $(top_srcdir)/auxdir/ltoptions.m4 \ - $(top_srcdir)/auxdir/ltsugar.m4 \ - $(top_srcdir)/auxdir/ltversion.m4 \ - $(top_srcdir)/auxdir/lt~obsolete.m4 \ - $(top_srcdir)/auxdir/slurm.m4 \ - $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ - $(top_srcdir)/auxdir/x_ac_affinity.m4 \ - $(top_srcdir)/auxdir/x_ac_aix.m4 \ - $(top_srcdir)/auxdir/x_ac_blcr.m4 \ - $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ - $(top_srcdir)/auxdir/x_ac_cflags.m4 \ - $(top_srcdir)/auxdir/x_ac_cray.m4 \ - $(top_srcdir)/auxdir/x_ac_databases.m4 \ - $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ - $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ - $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ - $(top_srcdir)/auxdir/x_ac_gtk.m4 \ - $(top_srcdir)/auxdir/x_ac_iso.m4 \ - $(top_srcdir)/auxdir/x_ac_munge.m4 \ - $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ - $(top_srcdir)/auxdir/x_ac_pam.m4 \ - $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ - $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ - $(top_srcdir)/auxdir/x_ac_readline.m4 \ - $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ - $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ - $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ - $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ - $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ - $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTHD_CFLAGS = @AUTHD_CFLAGS@ -AUTHD_LIBS = @AUTHD_LIBS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BG_INCLUDES = @BG_INCLUDES@ -BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ -BLCR_HOME = @BLCR_HOME@ -BLCR_LDFLAGS = @BLCR_LDFLAGS@ -BLCR_LIBS = @BLCR_LIBS@ -BLUEGENE_LOADED = @BLUEGENE_LOADED@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMD_LDFLAGS = @CMD_LDFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ -EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ -FGREP = @FGREP@ -GREP = @GREP@ -GTK2_CFLAGS = @GTK2_CFLAGS@ -GTK2_LIBS = @GTK2_LIBS@ -HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ -HAVEPGCONFIG = @HAVEPGCONFIG@ -HAVEPKGCONFIG = @HAVEPKGCONFIG@ -HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ -HAVE_OPENSSL = @HAVE_OPENSSL@ -HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_LDFLAGS = @LIB_LDFLAGS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ -MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ -MUNGE_LIBS = @MUNGE_LIBS@ -MYSQL_CFLAGS = @MYSQL_CFLAGS@ -MYSQL_LIBS = @MYSQL_LIBS@ -NCURSES = @NCURSES@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NUMA_LIBS = @NUMA_LIBS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_LIBS = @PAM_LIBS@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PGSQL_CFLAGS = @PGSQL_CFLAGS@ -PGSQL_LIBS = @PGSQL_LIBS@ -PLPA_LIBS = @PLPA_LIBS@ -PROCTRACKDIR = @PROCTRACKDIR@ -PROJECT = @PROJECT@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -READLINE_LIBS = @READLINE_LIBS@ -RELEASE = @RELEASE@ -SED = @SED@ -SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ -SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLURMCTLD_PORT = @SLURMCTLD_PORT@ -SLURMDBD_PORT = @SLURMDBD_PORT@ -SLURMD_PORT = @SLURMD_PORT@ -SLURM_API_AGE = @SLURM_API_AGE@ -SLURM_API_CURRENT = @SLURM_API_CURRENT@ -SLURM_API_MAJOR = @SLURM_API_MAJOR@ -SLURM_API_REVISION = @SLURM_API_REVISION@ -SLURM_API_VERSION = @SLURM_API_VERSION@ -SLURM_MAJOR = @SLURM_MAJOR@ -SLURM_MICRO = @SLURM_MICRO@ -SLURM_MINOR = @SLURM_MINOR@ -SLURM_PREFIX = @SLURM_PREFIX@ -SLURM_VERSION = @SLURM_VERSION@ -SO_LDFLAGS = @SO_LDFLAGS@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LDFLAGS = @SSL_LDFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -UTIL_LIBS = @UTIL_LIBS@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = \ - test_hostlist.py - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contribs/python/hostlist/test/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu contribs/python/hostlist/test/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/contribs/python/hostlist/test/test_hostlist.py b/contribs/python/hostlist/test/test_hostlist.py deleted file mode 100644 index d539742df392842dc18f0d3b6511492b64b12125..0000000000000000000000000000000000000000 --- a/contribs/python/hostlist/test/test_hostlist.py +++ /dev/null @@ -1,123 +0,0 @@ -from hostlist import expand_hostlist, collect_hostlist, BadHostlist -import unittest - -class TestExpand1(unittest.TestCase): - - def expand_eq(self, hostlist, expanded_list): - self.assertEqual(expand_hostlist(hostlist), expanded_list) - - def expand_sort_eq(self, hostlist, expanded_list): - self.assertEqual(expand_hostlist(hostlist, sort=True), expanded_list) - - def expand_length(self, hostlist, expanded_length): - self.assertEqual(len(expand_hostlist(hostlist)), expanded_length) - - def expand_bad(self, hostlist): - self.assertRaises(BadHostlist, expand_hostlist, hostlist) - - def test_expand(self): - self.expand_eq("n[9-11]", ["n9", "n10", "n11"]) - self.expand_sort_eq("n[9-11]", ["n9", "n10", "n11"]) - self.expand_eq("n[09-11]", ["n09", "n10", "n11"]) - self.expand_eq("n[009-11]", ["n009", "n010", "n011"]) - self.expand_sort_eq("n[009-11]", ["n009", "n010", "n011"]) - self.expand_eq("n[009-011]", ["n009", "n010", "n011"]) - - self.expand_eq("n[17-17]", ["n17"]) - self.expand_eq("n1,n3", ["n1", "n3"]) - self.expand_sort_eq("n1,n3", ["n1", "n3"]) - self.expand_eq("n3,n1", ["n3", "n1"]) - self.expand_sort_eq("n3,n1", ["n1", "n3"]) - self.expand_eq("n1,n3,n1", ["n1", "n3"]) - self.expand_sort_eq("n1,n3,n1", ["n1", "n3"]) - self.expand_eq("n3,n1,n3", ["n3", "n1"]) - self.expand_sort_eq("n3,n1,n3", ["n1", "n3"]) - - self.expand_eq("n[1],n3", ["n1", "n3"]) - self.expand_eq("n[1,3]", ["n1", "n3"]) - self.expand_eq("n[3,1]", ["n3", "n1"]) - self.expand_sort_eq("n[3,1]", ["n1", "n3"]) - self.expand_eq("n[1,3,1]", ["n1", "n3"]) - - self.expand_eq("n1,n2,n[9-11],n3", ["n1", "n2", "n9", "n10", "n11", "n3"]) - - self.expand_eq("n[1-3]m[4-6]", ["n1m4", "n1m5", "n1m6", - "n2m4", "n2m5", "n2m6", - "n3m4", "n3m5", "n3m6"]) - self.expand_eq("n[1-2][4-5]m", ["n14m", "n15m", - "n24m", "n25m"]) - self.expand_eq("[1-2][4-5]", ["14", "15", - "24", "25"]) - - self.expand_length("n[1-100]m[1-100]", 100*100) - self.expand_length("[1-10][1-10][1-10]", 10*10*10) - - self.expand_eq("n[1-5,3-8]", ["n1", "n2", "n3", "n4", "n5", "n6", "n7", "n8"]) - self.expand_eq("n[3-8,1-5]", ["n3", "n4", "n5", "n6", "n7", "n8", "n1", "n2"]) - self.expand_sort_eq("n[3-8,1-5]", ["n1", "n2", "n3", "n4", "n5", "n6", "n7", "n8"]) - - self.expand_eq("", []) - - self.expand_bad("n[]") - self.expand_bad("n[-]") - self.expand_bad("n[1-]") - self.expand_bad("n[-1]") - self.expand_bad("n[1,]") - self.expand_bad("n[,1]") - self.expand_bad("n[1-3,]") - self.expand_bad("n[,1-3]") - self.expand_bad("n[3-1]") - self.expand_bad("n[") - self.expand_bad("n]") - self.expand_bad("n[[]]") - self.expand_bad("n[1,[]]") - self.expand_bad("n[x]") - self.expand_bad("n[1-10x]") - - self.expand_bad("n[1-1000000]") - self.expand_bad("n[1-1000][1-1000]") - - def collect_eq(self, hostlist, expanded_list): - # Note the order of the arguments! This makes it easier to - # copy tests between the expand and collect parts! - self.assertEqual(hostlist, collect_hostlist(expanded_list)) - - def test_collect(self): - self.collect_eq("n[9-11]", ["n9", "n10", "n11"]) - self.collect_eq("n[09-11]", ["n09", "n10", "n11"]) - self.collect_eq("n[009-011]", ["n009", "n010", "n011"]) - - self.collect_eq("n[1-3,9-11]", ["n1", "n2", "n9", "n10", "n11", "n3"]) - - self.collect_eq("m1,n[9-11],p[7-8]", ["n9", "n10", "p7", "m1", "n11", "p8"]) - - self.collect_eq("x[1-2]y[4-5]", ["x1y4", "x1y5", - "x2y4", "x2y5"]) - self.collect_eq("[1-2]y[4-5]z", ["1y4z", "1y5z", - "2y4z", "2y5z"]) - - self.collect_eq("x1y[4-5],x2y4", ["x1y4", "x1y5", "x2y4"]) - self.collect_eq("x1y5,x2y[4-5]", ["x1y5", "x2y4", "x2y5"]) - self.collect_eq("x1y5,x2y4", ["x1y5", "x2y4"]) - - self.collect_eq("", [""]) - - self.collect_eq("n[9,09]", ["n09","n9"]) - self.collect_eq("n[9,09]", ["n9","n09"]) - self.collect_eq("n[9-10]", ["n9","n10"]) - self.collect_eq("n[09-10]", ["n09","n10"]) - self.collect_eq("n[009,10]", ["n009","n10"]) - - self.collect_eq("x", ["x"]) - self.collect_eq("x", ["x", "x"]) - self.collect_eq("x,y", ["x", "y", "x"]) - - self.collect_eq("n1", ["n1"]) - self.collect_eq("n1", ["n1", "n1"]) - self.collect_eq("n[1-2]", ["n1", "n2", "n1"]) - - self.collect_eq("x,y[10-12],z", ["z","y10","y12", "x", "y11"]) - - -if __name__ == '__main__': - unittest.main()