Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d6c30f66
Commit
d6c30f66
authored
Oct 23, 1999
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed massive comment speculating about needlessly complex variations
on the manifest file syntax.
parent
346e320c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
139 deletions
+0
-139
Lib/distutils/command/dist.py
Lib/distutils/command/dist.py
+0
-139
No files found.
Lib/distutils/command/dist.py
View file @
d6c30f66
...
...
@@ -457,142 +457,3 @@ def findall (dir = os.curdir):
list
.
sort
()
return
list
# ======================================================================
# Here follows some extensive mental masturbation about how to
# make the manifest file and search algorithm even more complex.
# I think this is all gratuitous, really.
# Hmm, something extra: want to apply an exclude pattern over a whole
# subtree without necessarily having to explicitly include files from it,
# ie. it should apply after gathering files by other means (simple
# include pattern)
# . !*~ !*.bak !#*#
# and we also want to prune at certain directories:
# . !RCS !CVS
# which again should apply globally.
#
# possible solution:
# - exclude pattern in a directory applies to all files found under that
# directory
# - subdirectories that match an exclude pattern will be pruned
# - hmmm, to be consistent, subdirectories that match an include
# pattern should be recursively included
# - and this should apply to "simple" patterns too
#
# thus:
#
# examples/
#
# means get everything in examples/ and all subdirs;
#
# examples/ !*~ !#*# !*.py[co]
#
# means get everything under examples/ except files matching those three globs;
#
# ./ !RCS !CVS
#
# means get everything under current dir, but prune RCS/CVS directories;
#
# ./ !*~ !#*# !*.py[co] !RCS !CVS
# ! build/
# ! experimental/
#
# means get everything under the distribution directory except the usual
# excludes at all levels; exclude "build" and "experimental" under the
# distribution dir only.
#
# Do the former examples still work?
#
# distutils/ *.py
# ! distutils/bleeding_edge.py
#
# means all .py files recursively found under distutils, except for the one
# explicitly named.
#
# distutils/ *.py !bleeding_edge.py
#
# means the same, except bleeding_edge.py will be excluded wherever it's
# found -- thus this can exclude up to one file per directory under
# distutils.
#
# distutils/*.py
# ! distutils/bleeding_edge.py
#
# gets exactly distutils/*.py, minus the one explicitly mentioned exclude, and
#
# distutils/*.py
# distutils/ !bleeding_edge.py
#
# coincidentally does the same, but only because there can only be one file
# that matches the exclude pattern. Oh, we'd still like
#
# distutils *.py !bleeding*.py
# distutils/bleeding_ledge.py
#
# to include distutils/bleeding_ledge.py -- i.e. it should override the
# earlier exclude pattern by virtue of appearing later in the manifest. Does
# this conflict with the above requirements, ie. that "!RCS" and "!*~" should
# apply everywhere? Hmm, I think it doesn't have to, as long as we're smart
# about it. Consequence:
#
# . !RCS !CVS
# distutils *
#
# will go ahead and include RCS and CVS files under distutils, but
#
# distutils *
# . !RCS !CVS
#
# will do the right thing. Hmmm. I think that's OK, and an inevitable
# consequence of the ability to override exclusions.
# OK, new crack at the search algorithm.
#
# for pattern in manifest:
# if dir-pattern: # ie. first word is a directory (incl. "."!)
# dir = first word on line
# patterns = rest of line
# if patterns:
# for dpattern in patterns:
# if exclude-pattern:
# remove from files anything matching dpattern (including pruning
# subtrees rooted at directories that match dpattern)
# else:
# files.append (recursive_glob (dir, dpattern))
# else:
# files.append (recursive_glob (dir, '*')
#
# elif include-pattern: # it's a "simple include pattern"
# files.append (glob (pattern))
#
# else: # it's a "simple exclude pattern"
# remove from files anything matching pattern
# The two removal algorithms might be a bit tricky:
#
# "remove simple exclude pattern":
# for f in files:
# if f matches pattern:
# delete it
#
# "remove recursive exclude pattern":
# for f in files:
#
# t = tail (f)
# while t:
# if t matches pattern:
# delete current file
# continue
# t = tail (t)
#
# Well, that was an interesting mental exercise. I'm not completely
# convinced it will work, nor am I convinced this level of complexity
# is necessary. If you want to exclude RCS or CVS directories, just
# don't bloody include them!
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment