MCPcopy
hub / github.com/pex-tool/pex / add_source

Method add_source

pex/pex_builder.py:207–216  ·  view source on GitHub ↗

Add a source to the PEX environment. :param filename: The source filename to add to the PEX; None to create an empty file at `env_filename`. :param env_filename: The destination filename in the PEX. This path must be a relative path.

(self, filename, env_filename)

Source from the content-addressed store, hash-verified

205 self._pex_info = value
206
207 def add_source(self, filename, env_filename):
208 """Add a source to the PEX environment.
209
210 :param filename: The source filename to add to the PEX; None to create an empty file at
211 `env_filename`.
212 :param env_filename: The destination filename in the PEX. This path
213 must be a relative path.
214 """
215 self._ensure_unfrozen("Adding source")
216 self._copy_or_link(filename, env_filename, "source")
217
218 def add_resource(self, filename, env_filename):
219 """Add a resource to the PEX environment.

Calls 2

_ensure_unfrozenMethod · 0.95
_copy_or_linkMethod · 0.95