3 Kl�fw � @ s� d Z ddlZddlZyddlmZ W n ek rD ddlmZ Y nX ddlZddlZddl Z ddl Z ddlmZ dd� Z G dd � d �Zd d� ZG dd � d �ZdS )zU Utilities for dealing with the compilation of modules and creation of module tress. � N)�getstatusoutput� )�defaultsc C s0 t jd| �}t|�dkr(| d j� r(dS dS dS )z'Check that a module name is valid. z[^a-zA-Z0-9_\-\.]r TFN)�re�findall�len�isalpha)�modname�m� r �/usr/lib/python3.6/module.py� is_valid_name( s r c @ sN e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z ddd�Z dS )� ModuleTreec C s || _ d | _d S )N)r �dirname)�selfr r r r �__init__2 s zModuleTree.__init__c C s | j S )N)r )r r r r �dir_name6 s zModuleTree.dir_namec C s | j d | j d S )N�/z.te)r r )r r r r �te_name9 s zModuleTree.te_namec C s | j d | j d S )Nr z.fc)r r )r r r r �fc_name<